[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Crystal Report half hour date format.

Posted on 2009-12-22
3
Medium Priority
?
699 Views
Last Modified: 2012-05-08
I am creating a Crystal Report in CR10 and need to show data in half hour format. I can get in hourly format, but need in half hour.
0
Comment
Question by:chadd25
2 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 26109245
There is no easy formula to do that.

Can you givve some examples of what you want shown say for

5:15
5:10
5:20
5:35
5:45
5:55

mlmcc
0
 
LVL 13

Accepted Solution

by:
PCIIain earned 1000 total points
ID: 26110926
Round down to previous half hour

time(datepart("h",{Command.timeval}),truncate(datepart("n",{Command.timeval})/30)*30,00)

gives 5:00 for 5:00-5:29 and 5:30 for 5:30-5:59

Round up to next half hour.

time(dateadd("n",roundup((datepart("n",{Command.timeval})/30))*30-datepart("n",{Command.timeval}),{Command.timeval}))

Gives 5:30 for 5:01-5:30 and 6:00 for 5:31-6:00
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

872 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