You are not logged in.
Pages: 1
Hi,
mormot1 was handling Tdate/TDateTime as text in database and we can filter on with some funtions like here https://synopse.info/forum/viewtopic.php?id=4909
but in mormot2 it's handled as float and some of these functions aren't available.
How we can filter on a Tdate/TDateTime field on mormot2 ?
Regards,
Offline
I don't think so.
If you define TOrm fields as TDateTime and TDateTimeMS, they will be handled as ISO-8601 text in the database with mORMot 2 (via oftDateTime / oftDataTimeMS field types).
See GetOrmFieldType() in mORMot 2 and TTypeInfo.GetSQLFieldType() in mORMot 1.
The TOrmTest class in test.core.data.pas regression tests validate this behavior. It has a TOrmTest.ValDate: TDateTime field, which is handled as ISO-8601 text in the DB.
Perhaps you use plain TDate, which is supported as float in both mORmot 1 or mORMOt 2.
Offline
Hello,
You're right AB I used plain TDate which is supported as float. Now I change it to TDateTime and it works.
Thnx,
Offline
Pages: 1