Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    10

    Cool Unanswered: TimeStamp - Format in the Where Clause

    I am trying to write a query that pulls that last hour data in SQL Server and am having problems.

    Here is what I have in the where clause for the timestamp-

    TRAN_RCPT_TS >= '#DateFormat(time_now,"yyyy-mm-dd") & "-" & TimeFormat(DateAdd("n", -60, time_now), "HH.mm") & ".00"#'
    --

    Joe Torres

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Is this Access or SQL Server?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Nov 2003
    Posts
    10
    Originally posted by Brett Kaiser
    Is this Access or SQL Server?
    I am using DTS and importing from a DB2 Database to SQL Server
    --

    Joe Torres

  4. #4
    Join Date
    Nov 2003
    Posts
    10
    Originally posted by Brett Kaiser
    Is this Access or SQL Server?
    I've done some updates but still getting an error: Here is what I have

    WHERE req.TRAN_RCPT_TS >= DateFormat(Now()),"yyyy-mm-dd") AND "-" & TimeFormat(DateAdd("n", -60, Now())), "HH.mm") & ".00"
    --

    Joe Torres

  5. #5
    Join Date
    Sep 2003
    Posts
    212
    Originally posted by jgtorres
    I've done some updates but still getting an error
    what kinda errors?

Posting Permissions

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