Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Convert number to time Post Reply Post New Topic
Author Message
MarieE
Newbie
Newbie


Joined: 15 Apr 2008
Location: United States
Online Status: Offline
Posts: 2
Quote MarieE Replybullet Topic: Convert number to time
    Posted: 15 Apr 2008 at 5:00pm
new to CR - CR XI  - my time field comes in as a number but needs to be converted to military time
 
for example   
number 124800 should be 1248
number 2400 should be 0024
number 21700 should be 0217
 
thanks for your help
 
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 15 Apr 2008 at 6:10pm
See if this works for you:
CStr({table.timefield}/100, "0000")

I have three chapters of examples for how to program Crystal Reports and use built-in functions like this in my Encyclopedia book. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
MarieE
Newbie
Newbie


Joined: 15 Apr 2008
Location: United States
Online Status: Offline
Posts: 2
Quote MarieE Replybullet Posted: 15 Apr 2008 at 7:48pm
It worked perfectly!   
 
I've just ordered your book from Amazon.  I'm looking forward to using as a resource as well as your forum.
 
thank you so very much Smile
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 16 Apr 2008 at 10:56am
Great! Thanks for supporting the forum. 

Ask questions here anytime. If I'm too busy to post a response, there is always someone knowledgeable who has an answer.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.