[Gambas-user] datefields revisited

Steven Lobbezoo steven at ...1652...
Fri May 18 22:34:41 CEST 2007


Hi all,

I still have a problem with datefields in an MySQL database.

The field in the database is of type 'date'
I only use db.exec to read and update etc.
I handle the field in a normal text box.

When I read a date from the database (written with an other program), it's ok, 
I get a textbox with dd/mm/yy in it, just what i want. ;-)

But when i update the field, f.i. I change 17/05/07 into 18/05/07 and write it 
back into the database, i get written dd : 07, mm: 05 and yy : 18
The database then reads 7 may 2018.

There's some logic here that escapes me. If I read it simply -direct - why 
cannot i write it back the same way ?
Or do I convert the textbox.Text into a date value with a rather complex 
expression each time ?

Steven




More information about the User mailing list