If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > year day of file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-13-06, 06:56
dsehmby dsehmby is offline
Registered User
 
Join Date: Feb 2004
Location: London
Posts: 76
year day of file

Hi,

Any suggestion on how I would get the year day of a file?

Have tried stat [7] but I get the wrong date, in fact this wrong date is what I get for all files in a folder!

Have tried the following:
my ($fsec,$fmin,$fhour,$fmday,$fmon,$fyear,$fwday,$fy day,$isdst)=localtime(stat($directory));
where $directory is the file but I get 56,7,21,13,11,70,0,346 when the modified date of the file is 13/12/2006 14:31! Any help would be much appreciated...
Reply With Quote
  #2 (permalink)  
Old 12-13-06, 17:29
KevinADC KevinADC is offline
Registered User
 
Join Date: Feb 2006
Posts: 56
my $yday = (localtime((stat($directory))[10]))[7];
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On