Buzzsaw Forum Archive
Welcome to Autodesk’s Buzzsaw Forums. Share your knowledge, ask questions, and explore popular Buzzsaw topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetCreationDate property

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
3470 Views, 4 Replies

GetCreationDate property

What format is this creationdate in? For a file that was created on 01/30/2007 it shows a creation date of 39112.6.
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

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?
Message 3 of 5
dave.watt
in reply to: Anonymous

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.
Message 4 of 5
Anonymous
in reply to: Anonymous

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?
Message 5 of 5
dave.watt
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report