Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: CONVERT TIME Post Reply Post New Topic
Author Message
pjgreports
Newbie
Newbie
Avatar

Joined: 29 Jul 2011
Online Status: Offline
Posts: 14
Quote pjgreports Replybullet Topic: CONVERT TIME
     Posted: 22 Sep 2011 at 10:08am
I have database field (PAUDIT.TIME) string [6].  Data format 235943.  Would like to convert the the data for example 235943 to be shown as 11:59:43 PM or AM on the crystal report. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Sep 2011 at 10:15am
time(left(PAUDIT.TIME,2)+':'+mid(PAUDIT.TIME,3,2)+':'+right(PAUDIT.TIME,2))
IP IP Logged
pjgreports
Newbie
Newbie
Avatar

Joined: 29 Jul 2011
Online Status: Offline
Posts: 14
Quote pjgreports Replybullet Posted: 23 Sep 2011 at 5:16am

That worked !

IP IP Logged
pjgreports
Newbie
Newbie
Avatar

Joined: 29 Jul 2011
Online Status: Offline
Posts: 14
Quote pjgreports Replybullet Posted: 23 Sep 2011 at 5:17am
Had to add the brackets though time(left({PAUDIT.TIME},2)+':'+mid({PAUDIT.TIME},3,2)+':'+right({PAUDIT.TIME},2))
IP IP Logged
pjgreports
Newbie
Newbie
Avatar

Joined: 29 Jul 2011
Online Status: Offline
Posts: 14
Quote pjgreports Replybullet Posted: 23 Sep 2011 at 5:18am
Thanks for your help
IP IP Logged
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