• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk Buzzsaw Developer

    Reply
    Valued Contributor
    Posts: 56
    Registered: ‎09-02-2004

    GetCreationDate property

    1565 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.
    Please use plain text.
    Valued Contributor
    Posts: 56
    Registered: ‎09-02-2004

    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?
    Please use plain text.
    Employee
    Posts: 18
    Registered: ‎02-09-2007

    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.
    Please use plain text.
    Valued Contributor
    Posts: 56
    Registered: ‎09-02-2004

    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?
    Please use plain text.
    Employee
    Posts: 18
    Registered: ‎02-09-2007

    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
    Please use plain text.