Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Report Design
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Report Design
Topic: string(MM/YYYY) to date
Author
Message
jbalbo
Senior Member
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Topic: string(MM/YYYY) to date
Posted: 19 Jun 2012 at 11:54am
Hi ,
I have data coming from sql as a string in MM/YYYY format
I need to convert to a date in the same format ?
Thanks
Joe
Edited by jbalbo - 19 Jun 2012 at 11:54am
IP Logged
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Posted: 19 Jun 2012 at 9:45pm
date(tonumber(right({table.field},4),tonumber(left({table.field},2)),01)
You can format the field however you like by right-clicking on it in design mode and selecting format.
Regards,
Ryan.
IP Logged
jbalbo
Senior Member
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 20 Jun 2012 at 4:11am
Hi Ryan,
its sems to have an error of a missing ')' tried a few things but no luck
Cant see where its wrong??
IP Logged
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Posted: 20 Jun 2012 at 4:15am
That's my bad for rushing! :)
Try this;
date(tonumber(right({table.field},4)),tonumber(left({table.field},2)),01)
Regards,
Ryan.
IP Logged
jbalbo
Senior Member
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 25 Jun 2012 at 5:56am
thx for getting back...
tried it and got string is non-numeric???
this is what I have in the formula
date(tonumber(right({Eliot_V_Avg_Days_Late_PN_Entry.MM/YYYY},4)),tonumber(left({Eliot_V_Avg_Days_Late_PN_Entry.MM/YYYY},2)),01)
{Eliot_V_Avg_Days_Late_PN_Entry.MM/YYYY} is a string[7]
thx again
now that I see it in writing I assume its the '/' causing it
how can I include or exclude?
Edited by jbalbo - 25 Jun 2012 at 5:57am
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.