Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numeric Value Of A Datetime Field

Status
Not open for further replies.

TomSalvato

Technical User
Mar 24, 2010
64
US
Hello All,

I have a datetime field and I need to know the numeric value. By 'numeric value' I'm referring to that individual number that all days have since Dec.30,1899. I think it's something like the DateTimeValue function, but I can't find a good example of it in crystal.

-TS
 
I could not find a function that directly addresses your issue. But I would think that you could use the datediff function (i.e. datediff("d", date(1899,12,30),{date_field}).
 
I believe that as long as the field is defined as a "date",, then subtract that field fron todays date, and get the number of days that have elapsed.
 
Thanks so much for the replies, guys. I'll give your suggestion a go tomorrow when I get back to my desk! -TS
 
Thanks again!

You guys set me on the right path, and I think I'm there now. Going to go with the 'elapsed days from today' scenario.

-TS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top