Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2728
  • Last Modified:

Crystal formula to convert numeric field to time

I have a pervasive database with a time field that is in numeric value

13070614 = 1:07:06 pm and 14 milliseconds
9163401= 9:16:34 am and 01 milliseconds

I only need the hour and minute.

Can someone help me with a formula to convert to time for this?
0
Gerhardpet
Asked:
Gerhardpet
1 Solution
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
StringVar sMyTime := ToText({your_numeric_column}, 0, "");

IF Len(sMyTime) = 8 Then
    cTime(sMyTime[1 to 2] & ":" & sMyTime[3 to 4] & ":" & sMyTime[5 to 6])
Else
    cTime(sMyTime[1] & ":" & sMyTime[2 to 3] & ":" & sMyTime[4 to 5]);
0
 
GerhardpetAuthor Commented:
That works perfect! Thanks Ido.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now