470,602 Members | 1,694 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,602 developers. It's quick & easy.

nvarchar to smalldatetime

Please help.
I have a ms sql table called data. Two fields,
saledate(smalldatetime),saledatetext(nvarchar)

I have dates (ex. 05/04/05) in the saledatetext, but I need this
converted into smalldatetime format and placed in the saledate column.

Can you tell me how to do this using sql query analyzer?
*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #1
2 2120
"Joey Martin" <jo**@infosmiths.net> wrote in message
news:OR****************@TK2MSFTNGP12.phx.gbl...
Please help.
I have a ms sql table called data. Two fields,
saledate(smalldatetime),saledatetext(nvarchar)

I have dates (ex. 05/04/05) in the saledatetext, but I need this
converted into smalldatetime format and placed in the saledate column.

Can you tell me how to do this using sql query analyzer?
*** Sent via Developersdex http://www.developersdex.com ***


UPDATE data
SET saledate = CAST(saledatetext AS SMALLDATETIME)
Jul 22 '05 #2
perfect...thanks for the prompt reply!

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Joey Martin | last post: by
7 posts views Thread by Marc Pelletier | last post: by
2 posts views Thread by Marc Pelletier | last post: by
2 posts views Thread by Salim AfĢar | last post: by
2 posts views Thread by .Net Sports | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.