July 29, 2003 at 8:27 am
Hullo!
I am using xp_getfiledetails to pull back the time and date of last write when I look at the time it doesn't look like anything I am familiar with. it doesn't fit the 00:00:00 format some are 4 digit some are 5 digit and some are 6 digit. I am thinking this may be a minute count from midnight or something else. If anyone has a clue let me know!
Wes
July 29, 2003 at 8:35 am
Hi Wes,
quote:
I am using xp_getfiledetails to pull back the time and date of last write when I look at the time it doesn't look like anything I am familiar with. it doesn't fit the 00:00:00 format some are 4 digit some are 5 digit and some are 6 digit. I am thinking this may be a minute count from midnight or something else. If anyone has a clue let me know!
without digging deeper.
Could it be the Windows Filetime structure like this
typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME;
If so, if I remember right it's a count since 01/01/16xx. So you might take a look at MSDN for 'About Time'
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
July 29, 2003 at 8:56 am
Hi Wes,
you get a result similar to
Alternate Name (null)
Size 83886080
Creation Date 19970627
Creation Time 90233
Last Written Date 19980312
Last Written Time 204127
Last Accessed Date 19980312
Last Accessed Time 204127
Attributes 32
??
Haven't dealt much with it, but I think there are API functions like GetFileTime you can use from VB do get this more readable
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
July 29, 2003 at 9:41 am
you also get single digit numbers which isn't possible if it is doing the count from 1/1/1746 or whatever the year is. hrum.. I'll keep diging.
Wes
July 29, 2003 at 9:46 am
quote:
you also get single digit numbers which isn't possible if it is doing the count from 1/1/1746 or whatever the year is. hrum.. I'll keep diging.
save your time. google on this. that's where the above mentioned numbers are from.
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
July 29, 2003 at 8:06 pm
Well I figured it out. the time isn't zero filled to a 24 hour clock. Say the time was midnight and 56 min 23 sec it would only read 5623 and not zero fill the other two digits. or if it is a single digit hour instead of it being 022332 it would drop the front zero. Once I padded the string with zeros on the front to maintain all six digits the times come out just fine.
Wes
July 30, 2003 at 12:05 am
Hi Wes,
quote:
Well I figured it out. the time isn't zero filled to a 24 hour clock. Say the time was midnight and 56 min 23 sec it would only read 5623 and not zero fill the other two digits. or if it is a single digit hour instead of it being 022332 it would drop the front zero. Once I padded the string with zeros on the front to maintain all six digits the times come out just fine.
thanks for the info!
I guess my thoughts with Windows filetime structures were a bit too complicated
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply