PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Magic Integer Date to WinDev Real Date
Magic Integer Date to WinDev Real Date
Started by Teun van Unen, May, 11 2005 6:24 PM - 1 reply
Posted on May, 11 2005 - 6:24 PM
Hello,
In the Magic definition of date-fields you can use a lot way of storages. For reading by ODBC you had to define the storage as 'YYMD Date', but the default is 'Integer Date'. When you read that storage by ODBC you get a value instead of a date. To preventing conversion within Magic you can use the following command to get the right date : V_Date = IntegerToDate(V_Integer - 657071),
where V_date is a date-field and V_Integer is the integer date-field read by ODBC.
The IntegerDate holds the number of days from a starting date, but in Magic and WinDev they are not the same.
Maybe this is interesting stuff for those who want to convert Magic_Pervasive files to WinDev_HyperFiles, maybe it's not.
Kind regards,
Teun.
Posted on May, 12 2005 - 12:55 AM
Yes, Tuen,
So when an OCX is written is VisVeryBasic you must also reload the starting date so WD can cope with it.
WorkingDate is date = DateSys
Mydate is Date = "19000101"
OpsDate = DateDifference(Mydate,Working_Date)
Gill

Hello,
In the Magic definition of date-fields you can use a lot way of storages. For reading by ODBC you had to define the storage as 'YYMD Date', but the default is 'Integer Date'. When you read that storage by ODBC you get a value instead of a date. To preventing conversion within Magic you can use the following command to get the right date : V_Date = IntegerToDate(V_Integer - 657071),
where V_date is a date-field and V_Integer is the integer date-field read by ODBC.
The IntegerDate holds the number of days from a starting date, but in Magic and WinDev they are not the same.
Maybe this is interesting stuff for those who want to convert Magic_Pervasive files to WinDev_HyperFiles, maybe it's not.
Kind regards,
Teun.