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 2020
:
Report Design
Topic: YearToDate
Oldest Post First
Newest Post First
Author
Message
CoachGBT
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 29
Topic: YearToDate
Posted: 20 Oct 2011 at 11:46am
I would like to create a formula to have SYSDATE or YTD minus 3 years. I created a function for MONTHS:
MONTHNAME(Month({ORD1.CREATED_DATETIME}),true)
and then created another formula where I subtracted 36 from MONTHS:
TONUMBER(
{@MONTHS
}) - 36
And this didn't work. Any suggestion would be greatly appreciated.
CoachGBT
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 20 Oct 2011 at 12:07pm
table.date in dateserial(year(currentdate)-3,1,1) to dateadd('yyyy',-3,currentdate)
IP Logged
CoachGBT
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 29
Posted: 21 Oct 2011 at 3:25am
It worked. Thank You!
Now as an added bonus; is it possible to do do the same from SYSDATE? SYSDATE minus 3 years. Have a daily running of 3 years from today's date.
CoachGBT
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 21 Oct 2011 at 3:29am
Not sure what your sys date is but theoretically you should be able to just replace sysdate where current date is in the formula
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
This page was generated in 0.015 seconds.
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
CLICK PLAYS
|
COACH FORUMS
|
TROPICAL FISH
© 2004-2024 Brian Bischof. All Rights Reserved.