Determining date format

obscuregirl

Member
Joined
Sep 13, 2006
Messages
15
Location
UK
Programming Experience
Beginner
Hi

I have a date value that is being brought back from a database that I want to put into a datetimepicker on my form. Unfortunately some of the existing data is rather messy and some dates have only been put in as the year. This means that I get an error when trying to put something like 2003 into a datetime picker that is expecting a ddmmyyyy format.

Is there any way that I can either check if the data is in the ddmmyyyy format or could I convert it to that format for populating the datetimepicker?

Thanks.
 
you would update the database to be consistent in this regard, and i would recommend also changing the data type of the database column to be a date instead of whatever it is that is allowing a year-only value

if you need some help with SQL queries that can identify and correct the dates, please feel free to ask...
 
Back
Top