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: [Resolved] Formula Issues
Author
Message
snufse
Newbie
Joined: 19 Mar 2008
Location: United States
Online Status: Offline
Posts: 36
Topic: [Resolved] Formula Issues
Posted: 02 May 2012 at 10:26am
Using CR XI and have following formulas:
CStr({Transaction.TicketNumber})
the value is the table is 8482931 and is being rendered as 8.482.931.00 how can I get the value without decimals and periods?
CStr(CDate({Transaction.DateOut}),"MM/dd/yyyy HH:mm")
the value in the table is 2/6/12 6:49 am and I need to get the value 2/6/2012 6:49am
Thank you.
Edited by snufse - 03 May 2012 at 4:40am
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 02 May 2012 at 11:56am
CStr({Transaction.TicketNumber},0,"")
CStr(CDate({Transaction.DateOut}),"M/d/yy H:mtt")
Edited by DBlank - 02 May 2012 at 12:00pm
IP Logged
snufse
Newbie
Joined: 19 Mar 2008
Location: United States
Online Status: Offline
Posts: 36
Posted: 03 May 2012 at 2:01am
I still have an issue with the date string conversion and not getting the time
CStr(CDate({Transaction.DateOut}),"MM/dd/yyyy HH:mm")
The DateOut is a datetime field in the table.
I get
02/06/2012 HH:mm
and would like to see 02/06/2012
6:49am
Edited by snufse - 03 May 2012 at 2:29am
IP Logged
snufse
Newbie
Joined: 19 Mar 2008
Location: United States
Online Status: Offline
Posts: 36
Posted: 03 May 2012 at 3:35am
I changed the the line of code to look like this:
CStr({Transaction.DateOut},"MM/dd/yyyy HH:mm")
and I am now getting
02/06/2012 06:49
which is good.
Last issue is: how do I get am or pm associated with the time?
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 03 May 2012 at 3:38am
use tt on the end
although you can handle all of the formatting by right clicking on the original datetime field
select format field
datetime tab
pick the one you want or use customize
Edited by DBlank - 03 May 2012 at 4:42am
IP Logged
snufse
Newbie
Joined: 19 Mar 2008
Location: United States
Online Status: Offline
Posts: 36
Posted: 03 May 2012 at 4:40am
That worked, Thank you
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
|
BAEZL
© 2004-2026 Brian Bischof. All Rights Reserved.