Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have small datetime field in a table.If that field is updated with GetDate function time part remains as zero(00).

For instance 12:10:00 instead of 12:10:10


Pls give a solution
Posted

1 solution

Read the documentation: MSDN: Smalldatetime[^]

"Defines a date that is combined with a time of day. The time is based on a 24-hour day, with seconds always zero (:00) and without fractional seconds."

So what you are seeing is exactly the behaviour expected of the data type.
 
Share this answer
 
Comments
rajeeshsays 31-Jul-14 8:56am    
Which data type is suitable to show the second part also.Please update me
CHill60 31-Jul-14 9:07am    
Try DateTime

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

  Print Answers RSS


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