PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Magic Integer Date to WinDev Real Date
Magic Integer Date to WinDev Real Date
Iniciado por develop_NO_SPAM, 11,may. 2005 18:24 - 1 respuesta
Publicado el 11,mayo 2005 - 18:24
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.
Publicado el 12,mayo 2005 - 00:55
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.