Times in SQL Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • trevorjhughes@gmail.com

    Times in SQL Server

    I am using an MS Access front end to input data into a SQL server
    database. From Access I am generating an update query utilising an
    inline function. My problem is that when I update a time value,
    instead of updating the field with something like 08:00:00 it updates
    it to 1/1/1900 08:00:00. Is there a way to force the update to only
    use the hours minutes and seconds and ignore the date part?

    Any help would be greatly appreciated.

    Regards
    Trevor

  • ZeldorBlat

    #2
    Re: Times in SQL Server


    trevorjhughes@g mail.com wrote:[color=blue]
    > I am using an MS Access front end to input data into a SQL server
    > database. From Access I am generating an update query utilising an
    > inline function. My problem is that when I update a time value,
    > instead of updating the field with something like 08:00:00 it updates
    > it to 1/1/1900 08:00:00. Is there a way to force the update to only
    > use the hours minutes and seconds and ignore the date part?
    >
    > Any help would be greatly appreciated.
    >
    > Regards
    > Trevor[/color]

    There is no SQL Server datatype that stores only the time without the
    date, so the answer is no. The solution is to ignore the date portion
    when you use the value -- not when you insert/update it.

    Comment

    Working...