|
I am doing an up date statement like the following: table.dateupdated is nvarchar(255) so when the update happens it's converting the datetime to style 109. Here's a test: How do I get the style to stay at 120 with in the nvarchar datatype?? Thanks! K
(comments are locked)
|
|
To get a style in the nvarchar, you need to specify it when converting to the nvarchar, so: gives in fact the inner convert to 120, is un-needed both give Ok, so when I do the update the above scenario does not work but if I do a select it does. I need the value stored to be in the style 120 format, so i need to get it working in the update statement. update table set Phase_1_Date_Delivered=convert(datetime,Phase_1_Date_Delivered,120) This still converts back to style 109. Thanks for your help!
Sep 16 '11 at 12:04 PM
katie 2
just tried the double convert again and I must have been doing something wrong because it appears to have converted properly.
Sep 16 '11 at 12:09 PM
katie 2
double checked and it's for sure for sure! :) Thanks so much. Fyi..I did the double convert method.
Sep 16 '11 at 12:16 PM
katie 2
(comments are locked)
|

