Date & Time Difference

  • Dear All,

    Am having a table where data's are saved in the below format. Could you please guide me how to check time difference for two account numbers from the same table.

    For e.g if i would like to extract more than one transaction done within 5 mins

    Attachments:
    You must be logged in to view attached files.
  • There aren't too many people that will open an Excel file.

    Please provide your sample data and requirements as SQL scripts.

  • DATE/TIME data should be stored in DATE/TIME fields.  If they are stored in any other format, you should consider changing that.

    DATE/TIME data is not stored in a human-readable format.  It is converted to a human-readable format when it is displayed.

    You can use either DATEDIFF() to find the difference between two dates or DATEADD() to determine a threshold.  The latter one might be better, because it is less dependent on the scale chosen for the comparison.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

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

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