Add/Subtract Date/Time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amanjsingh
    New Member
    • Mar 2007
    • 48

    Add/Subtract Date/Time

    Hi,

    I have a Database (MSSQL) with some tables having multiple Time columns (which I imported from some Access DB).

    The DateTime format in the MSSQL is
    Code:
    1899-12-30 02:30:00.0
    format. I populate my web forms using these columns (start time etc.) My problem is I cannot seem to add subtract time. I only need time part and I can use TimeFormat() function but I cannot seem to add time.

    Can coldfusion deal with this format?

    Thanks.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Use the DateAdd function to add/subtract date/time.

    Comment

    • amanjsingh
      New Member
      • Mar 2007
      • 48

      #3
      Originally posted by acoder
      Use the DateAdd function to add/subtract date/time.
      Awesome! Thanks a lot.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        You're welcome.

        Comment

        Working...