Convert string into Date

Database

Convert string into Date

Hi all,

I'm after some help with converting strings in to dates

For example, when i tried to convert '01.12.2010' in to date format '2010-12-01'. I keep getting error "Invalid date supplied"?

Can anyone suggest a solution?

Many thanks in advance

Regards

Joe

Tags (1)
2 REPLIES
Enthusiast

Re: Convert string into Date

Joe, you must CAST the chars to DATE.

Try : CAST ('2010-12-01' as DATE)

BR
Dixxie
Enthusiast

Re: Convert string into Date

Select Cast(('01.12.2010' (Date,Format 'dd.mm.yyyy')) As Date)
;