How to compare server current time and my table time

  • Dear ALL

    I would like to write a query to compare my table colume date+ time with server current time.

    For example server current time > table column time 30 mins then will query the result

    Can you guys please give me some idea ?

    Thanks bros

  • I hope this would work, add the following code in your query and change the name of the DateColumn.

    where Getdate() > Dateadd(mi,30,DateColumn)


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply