Buzzsaw Developer

Reply
Valued Contributor
masa10789
Posts: 56
Registered: ‎09-02-2004
Message 1 of 5 (3,198 Views)

GetCreationDate property

3198 Views, 4 Replies
01-30-2007 07:04 AM
What format is this creationdate in? For a file that was created on 01/30/2007 it shows a creation date of 39112.6.
Valued Contributor
masa10789
Posts: 56
Registered: ‎09-02-2004
Message 2 of 5 (3,198 Views)

Re: GetCreationDate property

01-30-2007 07:28 AM in reply to: masa10789
I think I figured it out. If you add 2415019 to the creationdate number it gives you the gregorian date. Then apply the gregorian formula to convert the number to a MM-DD-YYYY date.

Is there another way of converting Buzzsaw's creationdate to MM-DD-YYYY or is this the best solution?
Employee
dave.watt
Posts: 18
Registered: ‎02-09-2007
Message 3 of 5 (3,198 Views)

Re: GetCreationDate property

02-09-2007 07:56 AM in reply to: masa10789
The value returned is the time in OLE DATE format. Summarizing from the Microsoft documentation describing that format:

0.0 of OLE DATE is midnight, 30 December 1899. The integer part of the number is the number of days since 30 December 1899. The fractional part is the fraction of the day, starting from midnight -- i.e. 0.5 is noon, 30 December 1899.

If you're using MFC or ATL (C++), the COleDateTime class does the dirty work for you. If you're using VB.Net, the DateTime.FromOADate method will get you what you want.
Valued Contributor
masa10789
Posts: 56
Registered: ‎09-02-2004
Message 4 of 5 (3,198 Views)

Re: GetCreationDate property

02-09-2007 08:32 AM in reply to: masa10789
This might be over my head. Here is what I am doing now...

I get a file object by using the "getfile" method. "FromOADate" is not an available method/property of this object. Is the "FromOADate" method from some other object I need to get? Is the "FromOADate" only available if using .NET?
Employee
dave.watt
Posts: 18
Registered: ‎02-09-2007
Message 5 of 5 (3,198 Views)

Re: GetCreationDate property

02-12-2007 12:46 PM in reply to: masa10789
FromOADate is a method on the Microsoft DateTime object.

http://msdn2.microsoft.com/en-us/library/system.datetime.fromoadate.aspx

The Visual Basic example from that page suggests:

Dim d As Double
Dim returnValue As DateTime

'Set d from your file object here

returnValue = DateTime.FromOADate(d)

Dave
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New Buzzsaw Category!

The Buzzsaw forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.