Print Page | Close Window

Dates Five Years Out - simple question

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9679
Printed Date: 28 Apr 2024 at 8:00pm


Topic: Dates Five Years Out - simple question
Posted By: lentil
Subject: Dates Five Years Out - simple question
Date Posted: 13 Apr 2010 at 2:10pm
Hi this is a really simple question but mind has gone blank!

I want to add a date to a date field !!

So my current date 15/04/09  I want to add five years to that date and make it 15/0414 via formula and add it to the report

Regards

Leith




Replies:
Posted By: FrnhtGLI
Date Posted: 14 Apr 2010 at 2:12am
dateadd('y', +5, {table.datefield})

-------------
|< /\ '][' ( )


Posted By: DBlank
Date Posted: 14 Apr 2010 at 3:46am
just to clarify:
dateadd('yyyy', 5, {table.datefield})
yyyy=year
y=day of year


Posted By: lentil
Date Posted: 14 Apr 2010 at 10:24am
Thanks I knew how simple it was I just couldnt remember off the top of my head!





Print Page | Close Window