PDA

Click to See Complete Forum and Search --> : data type conversion error when moving a date from a label to a database


Leeper77
Jan 27th, 2000, 07:31 PM
I am getting a data conversion error when i am moving a date from a label to a new db when the field is a date format do you guys have any ideas? thanks

JP
Jan 27th, 2000, 07:58 PM
When sending the date to the database, try formatting it into an accepted date:

eg: (assuming VB and SQL Server.....) database.table.date_column = IIf(Trim$(Label1.Caption) <> "", Format(Label1.Caption,"dd-mmm-yyyy", vbNullString)

Substitute "dd-mmm-yyyy" with whatever format works for you (I use this format and it always works).

JP