Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal formula to convert numeric field to time

Posted on 2014-03-30
2
Medium Priority
?
2,634 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 2000 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

670 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