Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: truncating issues Post Reply Post New Topic
Author Message
Paul375
Newbie
Newbie


Joined: 09 Jul 2015
Location: United States
Online Status: Offline
Posts: 4
Quote Paul375 Replybullet Topic: truncating issues
     Posted: 10 Jul 2015 at 10:24am
I am writing a report in Crystal XI release 2 to pull times the employees are stuck with admin work. The shifts run from 2200 to 0600 and etc. They may log in early yet I do not need the time before 2200. I am trying to write a formula to truncate the times before 2200 yet count the times from 2200 until they clear admin duties. For instance if someone logs in at 2155 and clears at 2210 I need to chop off the 5 mins before 2200 and count the 10 mins only.
The times are stored as a string and I am not able to find a solution in how to write the formula.

Edited by Paul375 - 10 Jul 2015 at 10:25am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jul 2015 at 4:03am
change the value with a formula?

if time(tonumber(left({@StartTime},2)),tonumber(right({@StartTime},2)),0) < time(22,0,0)
then time(22,0,0) else time(tonumber(left({@StartTime},2)),tonumber(right({@StartTime},2)),0)
IP IP Logged
Paul375
Newbie
Newbie


Joined: 09 Jul 2015
Location: United States
Online Status: Offline
Posts: 4
Quote Paul375 Replybullet Posted: 13 Jul 2015 at 5:44am
I really appreciate your assistance. That worked great!
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