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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert datetime field to numeric field

Status
Not open for further replies.

kristinaloupe

Technical User
May 12, 2004
31
US
I am using Crystal 10 .. does anyone know how to convert a datetime field to a numeric field?
 
It would help if you provided an example of what type of number you want based on a given datetime. Julian? or a number in yyyyMMddHHmmss format?

-LW
 
I agree that more info should be provided.

Basic idea is to convert it to text in the format that you want, then convert it to a number:

tonumber(totext({table.date},"yyyyMMddHHmmss"))

Change the format that you want the date converted to by changing the string format

~Brian
 
It is a datetime field like this... not Julian yyyyMMddHHmmss

Thanks so much!
 
Hi kristinaloupe ,
My curiosity is killing me...Why do this?

[profile]
 
turkbear.. I had a problem where I have .....

several events and dates that I need to look for (events in one table and dates in a different table).. but I only want the event and date most recent to come up on my report.. I was trying something different to get it to narrow it down. Unfortunately it didn't work.

But thanks to everyone who replied.... now I know if for some reason I may need this in the future.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top