Still not getting it WIth > Update AV_Cluster > set StatsDate = > CONVERT (datetime, '13/' + [AV_Cluster].[Month] + '/' + [AV_Cluster].[year], > 103)
I get Server: Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to float. I also tried Update AV_Cluster set StatsDate = '19960113' which worked and Update AV_Cluster set StatsDate = [AV_Cluster].[year] + [AV_Cluster].[month] + '13' which didn't work. BTW, the months are stored as 1 instead of 01. ----- Original Message ----- From: "Rich Wild" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 03, 2002 2:36 PM Subject: RE: [ cf-dev ] OT: SQL Server Query > you need to use convert (if your full date is a datetime datatype) > > try this: > Update AV_Cluster > set StatsDate = > CONVERT (datetime, '13/' + [AV_Cluster].[Month] + '/' + [AV_Cluster].[year], > 103) > > > the above syntax might not be completely right, but play around with CONVERT > anyway, read SQL Books Online for more help on the formats (103 in this case > being dd/mm/yyyy) > > > > -----Original Message----- > > From: Giles Roadnight [mailto:[EMAIL PROTECTED]] > > Sent: 03 October 2002 14:43 > > To: [EMAIL PROTECTED] > > Subject: [ cf-dev ] OT: SQL Server Query > > > > > > Hi > > > > Sorry for the off topic post. > > > > I have some SQL server tables that have a month and a year > > column and I want > > to put them both into one date column. I have tried the > > follwoing query but > > all of hte dates get set to the first of january 1900. > > > > Update AV_Cluster > > set StatsDate = 13/[AV_Cluster].[Month]/[AV_Cluster].[year] > > > > I have tried putting quotes around bits of the date and > > adding &'s and +'s > > in to join the string together but I got lots of errors. > > What am I doing wrong? > > > > Thanks > > > > Giles > > > > > > -- > > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > For human help, e-mail: [EMAIL PROTECTED] > > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
