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!

How to convert number field to time

Status
Not open for further replies.

cecilcheah

Programmer
Apr 30, 2001
28
CH
Hi all:

I am a beginner in CR. I have done a report showing average, maximum and minimun time values for workers coming in to work.

The database i use have all the values as numbers, the report is showing the correct average, max and min number values. Now my problem is i wish to change the text field from number to Time, how can this be done?

I have tried to define three new formula with

CTime (Minimum ({ANAE1OP.ERSTER_ANAESTART}, {ANAE1OP.EO_OPERATIONSSAAL})/60)

But the values returned is not correct.

Am i doing something wrong?

TIA

Cecil Cheah
 
You can search CTime is the Crystal Reports help for details, as there are various options for parameters. Just using hours and minutes is not one of the options I saw. Have you tried adding a value for seconds? Malcolm
 
What do you mean by:

Have you tried adding a value for seconds

The answer will be no as i do not know what you mean.

Thanks

Cecil
 
Adding a value for seconds:
CTime (Minimum ({ANAE1OP.ERSTER_ANAESTART}, {ANAE1OP.EO_OPERATIONSSAAL})/60, 0)
Malcolm
 
Hi there:

Thanks for helping.

I have solved the problem, i only have to divide the number by 1440 and i am getting the correct times.

Tbanks

Cecil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top