Results 1 to 2 of 2

Thread: T-SQL Date by hour difference

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    719

    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
    7,957

    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.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

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



Click Here to Expand Forum to Full Width