Results 1 to 3 of 3

Thread: GetDate()

  1. #1
    Join Date
    Aug 2003
    Location
    AUS
    Posts
    26

    Unanswered: GetDate()

    G'day,
    I want to display the current time minus 5 minutes. say
    2004-03-29 11:43:49.123 to be 2004-03-29 11:38:49.123.

    Is there any Equivalent to the DB2's CURRENT TIMESTAMP - 5 MINUTES which will display the current day say 2004-03-29 11:43:49.123 as
    2004-03-29 11:38:49.123


    cheers
    Melb
    Last edited by melb; 10-20-04 at 03:15.

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    select dateadd(mi, -5, getdate())

    but: "Date and time data from January 1, 1753 through December 31, 9999, to an accuracy of one three-hundredth of a second (equivalent to 3.33 milliseconds or 0.00333 seconds)." from BOL 'datetime and smalldatetime'.

  3. #3
    Join Date
    Aug 2003
    Location
    AUS
    Posts
    26
    Thanks Kaiowas

    cheers
    Melb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •