Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: Convert number to time
Author
Message
Lusco
Newbie
Joined: 17 Oct 2008
Online Status: Offline
Posts: 3
Topic: Convert number to time
Posted: 17 Oct 2008 at 10:27am
Hi,
I need to convert a number to a time value.
Ex:
A database returns this value - 7,90
I need a formula to convert this to 7h54m
Thanks
Edited by Lusco - 17 Oct 2008 at 10:28am
IP Logged
JohnT
Groupie
Joined: 20 Jan 2008
Online Status: Offline
Posts: 92
Posted: 17 Oct 2008 at 1:26pm
There are probably quite a few ways to do this. I'm sure mine isn't the most elegant.
I created 4 fields.
comapos:
INSTR(1,{@dbfield},",")
hours:
MID(
{@dbfield},1,{@comapos}-1
)
minutes:
MID(
{@dbfield},{@comapos}+1
)
outputtime:
{@hours
}& "h" & totext(int((tonumber(
{@minutes
}) * 60) /100),0) & "m"
Hope this helps. Good luck !
Edited by JohnT - 17 Oct 2008 at 2:13pm
IP Logged
Lusco
Newbie
Joined: 17 Oct 2008
Online Status: Offline
Posts: 3
Posted: 20 Oct 2008 at 2:02am
works fine
thank you a lot
stay cool
regards
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
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
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.