How do I use ancient dates in Servoy?

Hi all,

I have requirement to store dates beyond the range of the normal date type. The backend is SQL server, where normal datetime type goes back to January 1, 1753.
How do I get Servoy to use datetime2, or are there better strategies?

Servoy 6.1.x, SQL Server.

Christian

Hi Christian,

I don’t know if datetime2 does support ancient dates more than the old datetime type.
I needed support for datetime2 concerning the rounding issue in the datetime type.
Support case is this one: https://support.servoy.com/browse/SVY-5573

It says it should be fixed in 7.4, but I had no time yet to verify.

Anyway, I don’t think it will be an issue if you manually change the backend type manually.
In the end it is a date time type.

Hi Mark,

I could not view your case as the support website displays a very nice skull and bones if I try to log on :-)

It looks to me like Javascript in itself supports a wide range of dates, but this does not mean Servoy supports them.
I have tried changing the type in the backend and when I try to add dates I get complaints from servoy

“Wrapped java.lang.IllegalArgumentException: Column date_of_birth is too small” and
“com.servoy.j2db.dataprocessing.DataException: Conversion failed when converting date and/or time from character string”
and so on as I try various strategies with field types and formatters.

Servoy thinks datetime2 is a TEXT of length 27…

Hi, Christian.

I ran into this problem a couple of years ago and created a post regarding Microsoft’s datetime2 format:

https://www.servoy.com/forum/viewtopic.php?f=4&t=17597

I do not believe the jtids driver was ever updated to handle the datetime2 format, so your only option is to use the MSSQL driver.

I hope this helps!