Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
Goal:
The goal is to make the variable with value '2014-06-14 09:00:00.000'

Problem:
The syntax code is created as a dynamical object how do you make it from '2014-06-14 16:20:10.000' into value '2014-06-14 09:00:00.000'?




SQL
DECLARE @a datetime = '2014-06-14 16:20:10.000'
Posted

1 solution

Hi This value(2014-06-14 16:20:10.000) is created by syntax with current date and time,may be it create on 16-06-2014 at 4.20,if u want 2014-06-14 09:00:00.000 then u replace last 12 digit to 09:00:00.000 or u can create only date and append '09:00:00.000' at last of date.

I am not know why u use date and time like this,better to convert data and time based on system date and time like 16-06-2014 09.00 or 06-16-2014 09.00.i think u use default date and time format


Regards
Aravind
 
Share this answer
 
Comments
phil.o 17-Jun-14 2:46am    
Please avoid textspeak on this forum. Kindly use all the letters your keyboard is providing to you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900