sql - Time in datatime field -


i have field stores date , time need extract shows time shows date 01/01/1900.

i can extract time using below need include data of 01/01/1900

convert(varchar(12), w.created, 114) 

if using sql server, can do:

select cast('1900-01-01' datetime) + cast(cast(w.created time) datetime) 

this returns value datetime.

sql server has time data type. unclear why want add in fake date, can.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -