Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: converting military time Post Reply Post New Topic
Author Message
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Topic: converting military time
    Posted: 11 Aug 2009 at 12:06pm
I have data that I am trying to convert from Military time.  The data shows up like this 2359 so I created the following formula to put the Colon in the middle
if length ({RECMAST.TRANS_END_TIME}) =4 then
picture ({RECMAST.TRANS_END_TIME}, "XX:XX")
now the time shows up as 23:59
now i need to convert the military to regular time can someone please help me with this?
IP IP Logged
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Posted: 11 Aug 2009 at 1:30pm
That worked Thanks again!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Aug 2009 at 1:31pm
deleted last post....
TIME(picture ({RECMAST.TRANS_END_TIME}, "XX:XX"))


Edited by DBlank - 11 Aug 2009 at 1:31pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Aug 2009 at 1:45pm
if you have any that are 3 characters (H:MM) you may need another solution...
time( tonumber(left({RECMAST.TRANS_END_TIME},len({RECMAST.TRANS_END_TIME})-2)),   tonumber(right{RECMAST.TRANS_END_TIME},2)),00)
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.031 seconds.