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

DATETIME sort error

Status
Not open for further replies.

bp7

Programmer
Apr 3, 2015
3
CA
Here is the formula that I'm using:

RESULTDATE (formula 1)
cdate ({GLU_PHARM_GREATERTHANEQUAL180_J_.Date of Result})
TIME (formula 2)
TIME(picture ({GLU_PHARM_GREATERTHANEQUAL180_J_.Time of Result}, "XX:XX"))
DateTime (formula 3)
datetime({@resultdate},{@time})


I am sorting by patient name (which works fine) and then by DATETIME (ascending).

My output is appearing like this. Ideally for 3/19 I would like the 8:36 result first, 11:25 next etc. I then do an elapsed time calculation which does work. I am using CR10. Are my formulas incorrect?

299 MG/DL 70-105 3/19/15 11:25
255 mg/dl 70-105 3/19/15 8:36
277 MG/DL 70-105 3/19/15 12:25
249 MG/DL 70-105 3/19/15 13:29
249 MG/DL 70-105 3/20/15 20:53
281 MG/DL 70-105 3/20/15 17:43
 
Try using "00:00" instead of "xx:xx" in your time formula. It looks like that first space is getting truncated. You can put the formula on the report so you can see it, just to be sure.
 
and if you pt it on the report to look at, change it to a monospace font like Courier, that makes it much easier to see if a space is there or not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top