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

datetime formula

Status
Not open for further replies.

luxvivens

Technical User
May 20, 2010
27
0
0
CA
I have a “datetime” field that I wish to use to derive time difference in military hours.
Perhaps datedifference is the syntax to use.
An example of my data is:
John Doe
2/8/2013 5:50:00
2/8/2013 8:51:00
2/9/2013 14:44:00
Sally Smith
2/9/2013 20:20:00
2/10/2013 10:05:00
2/11/2013 16:45:00
My report is sorted by patient name and then by datetime.
Need help, please, with formula that will display 181, for example, in the second row of John Doe and so on.
I realize there won’t be a value for the first datetime for a patient.
I am using Crystal 10.
 
Try this:

Create this formula:

Code:
If      {Data.PatientName} = Previous({Data.PatientName})
Then    DateDiff('n', Previous({Data.DateTime}),{Data.DateTime})

Hope this helps

Cheers
Pete
 
Thanks Pete, and sorry about my very tardy response. It works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top