T-SQL Date by hour difference-VBForums
Results 1 to 2 of 2

Thread: T-SQL Date by hour difference

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    702

    T-SQL Date by hour difference

    Code:
    SELECT * FROM Transaction
    TransactionDate >= -- code here to compute if the Transaction Date is already 23hours long using UTC Date?
    Please help

  2. #2
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    3,122

    Re: T-SQL Date by hour difference

    Congratulations. You've just set a new standard for terse questions on the forum.

    I think you're after this:-
    Code:
    Where DateDiff(hour, TransactionDate, Getdate()) >= 23
    If that's not right you're going to have to give us more information about what you're trying to achieve.
    When one of my minions says, "Hey, he's just one guy, what can he do?" I say "This"... and shoot them.

    The problem with putting your lair in a volcano is keeping your robot army from melting.

    I know that the human being and the fish can coexist peacefully - George Bush

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.