Solved

Crystal formula to convert numeric field to time

Posted on 2014-03-30
2
2,547 Views
Last Modified: 2014-03-30
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
Comment
Question by:Gerhardpet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Ido Millet earned 500 total points
ID: 39965379
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
 
LVL 1

Author Comment

by:Gerhardpet
ID: 39965483
That works perfect! Thanks Ido.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question