Re: [GENERAL] converting varchar date strings to date

2003-10-14 Thread pw
Hello, This has been resolved. As I told a previous poster, CAST() wasn't working. I have no idea why. I finally used: UPDATE inventory SET date_field=date(vc_year||'-'||vc_month||'-'||vc_day ); Peter > pw writes: > > > How can I typecast a date generated from VARCHAR fields into > > a date

Re: [GENERAL] converting varchar date strings to date

2003-10-14 Thread Peter Eisentraut
pw writes: > How can I typecast a date generated from VARCHAR fields into > a date field Using CAST(). -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your

Re: [GENERAL] converting varchar date strings to date

2003-10-14 Thread Richard Huxton
On Tuesday 14 October 2003 17:54, pw wrote: > Hello, > > How can I typecast a date generated from VARCHAR fields into > a date field > > ie: > > UPDATE inventory SET date_field = vc_year||'-'||vc_month||'-'||vc_day; ... SET date_field = CAST(vc_year...vc_day AS date) or ... SET date_field = (vc_ye