Absolut valus of date difference

  • Hi,

    I am using datediff function in sql to calculate day difference beteween two days, But that is returning an integer. Instead of datediff is there any way , I can get absolute value for date differences.

    Thanks in advance.

  • ruchi (7/2/2009)


    Hi,

    I am using datediff function in sql to calculate day difference beteween two days, But that is returning an integer. Instead of datediff is there any way , I can get absolute value for date differences.

    Thanks in advance.

    Can you be a bit more specific in what you are looking for, perhaps showing an example would help.

  • SELECT DATEDIFF(MS, Date1, Date2) / 86400000.0E AS DecimalDay


    N 56°04'39.16"
    E 12°55'05.25"

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

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