How can i change varchar to datetime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a datetime column in db that stores datetime in varchar format suct
that "20060616120621". I want to get this date in a datetime format to make
comparisions according to that. How can i do that with an SQL Query or c#
code?

Thanks
 
You should call sql function to_date( string1, [ format_mask ], [
nls_language ] ) to convert a string to date format.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top