Finding number of days between two dates in SAS

I have two dateswhich I need to find the number of days between the two in SAS.

I have tried using Datediff in a PROC SQL Statement, but it cannot find the Datediff function.
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aloysius LowCommented:
quite simply, just take the 2 dates and subtract one from the other

in sas the dates are numeric values. e.g. 02 Jan 2010 - 01 Jan 2010 = 1.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
moriniaAdvanced Analytics AnalystAuthor Commented:
The dates are being stored as


    DATE_A                                          DATE_B
    01JUL2010:00:00:00       and         28SEP2010:06:07:00

I am subtracting DATE_A from DATE_B

PROC SQL;
Update Questions_Dates
Set Calc_Days = DATE_B - DATEA;
quit;

I am getting 7711620 as an answer.  What am I doing incorrectly.  Is it in the formatting.
Aloysius LowCommented:
what you got is the difference in seconds
if you want true date difference, use datepart function for the date: e.g. DATEPART(DATE_A)
moriniaAdvanced Analytics AnalystAuthor Commented:
Thanks,  that was it!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.