SQL Server convert YY/MM/DD to proper datetime -


i have varchar in format yy/mm/dd. want convert datetime format.

how that?

just cast value:

select cast('05/01/12' date) 

this work american setting sql server. if using international settings (or need international compatible), use convert().

select convert(date, '05/01/12', 11) 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -