Date

  • I have date field in table and data contain 2014-08-09 11:13:03.340

    when I use smalldatefield I am getting 2014-08-09 11:13:00 I should have got 2014-08-09 11:13:03

    Why the 03 is trimming in smalldatefield.

    how do I use select query to get 2014-08-09 11:13:03 from original Date records

    Regards,

    Nita

  • Smalldatetime doesn't store or uses seconds. It always rounds to minutes.

    Reference: http://msdn.microsoft.com/en-us/library/ms182418(v=sql.110).aspx

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply