Results 1 to 2 of 2

Thread: T-SQL Date by hour difference

  1. #1
    Fanatic Member
    Join Date
    Oct 06
    Posts
    650

    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
    Hirsute Mumbler FunkyDexter's Avatar
    Join Date
    Apr 05
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    2,418

    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
  •