Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hai,can anybody please tell me how to insert date and time separately in datetime fields in sqlserver using datetime picker.
Posted

 
Share this answer
 
v2
AFAIK You cannot insert only date or only time in a datetime field.
You can display only time or date based on string formats[^] in front end.
 
Share this answer
 
SQL
CONVERT(TIME(0),GETDATE()) AS HourMinuteSecond,
CONVERT(DATE,GETDATE(),101) AS DateOnly
 
Share this answer
 

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