Home > Community > General > Microsoft date format > Antwort auf: Microsoft date format

Bernhard KantzBernhard Kantz

There is no special function which converts your format into the calendar time format.
In FlexPro the calendar time value specifies the amount of time passed in seconds since January 1, 1970 at 00:00:00 UTC.
But you can create a VBA macro which converts the integer value into the calendar time format. It’s also possible to implement a custom import filter.

Use the Date data type.

    Dim nDate As Long
    Dim dtmDate As Date
    nDate = 39203
    dtmDate = nDate
    Dim oDataset As DataSet
    ThisDatabase.RootFolder.Add "Test", fpObjectTypeDataSet
    Set oDataset = ThisDatabase.RootFolder.Object("Test")
    With oDataset
        .DataStructure = fpDataStructureScalar
        .DataType(fpDataComponentY) = fpDataTypeCalendarTime
        .Value(fpDataComponentY) = dtmDate
    End With

See also
Automating Tasks
Automating Using FlexPro Visual Basic
A Custom Import Filter