Page 1 of 1

Wrong date format in database

PostPosted: Mon Apr 13, 2015 9:13 am
by lopamudram
Hello,

We are facing one random issue on date columns. The date entry fields has dd/MM/yyyy as dispay format and ddMMyy as edit format. When we enter date e.g 010101
it shows correct value on screen i.e 01/01/2001 but in database it is being stored as 2001-01-01 BC. Not sure when and why the "BC" is getting appended to the date value. This is affecting all the filters, find search and compare operations.

- Can reproduce issue with other edit formats.
- All the dates which are affected are post 01/01/2000.
- "BC" is getting appended to both DATE and DATETIME columns.
- Servoy version 7.4.2.

Any solution will be appreciated. Thanks in advance.

Lopamudra
lopamudram@mindfiresolutions.com

Re: Wrong date format in database

PostPosted: Thu May 21, 2015 10:37 am
by jcompagner
if you read such a date back from the database wat does datefield.getTime() tells you (whats the millis as a number)

and what does that getTime() tells you just before you save?