This is coming out to be a date format beast mode. How can i change this to integer?

(((DATE - Lag(DATE,1) over (partition by ID,FAMILY order by INVOICE))))

Tagged:

Best Answers

  • trafalger
    trafalger Coach
    Answer ✓

    use a DateDIFF to calculate the number of days between the dates!

  • ColemenWilson
    Answer ✓

    Agreed on DATEDIFF(). Also, adding a *1 to a field will force it to a number:

    Field*1

    or

    (CASE WHEN Field = 'Cat' THEN ID END)*1

    If I solved your problem, please select "yes" above

Answers