Poy

Hi,

I am currently using CRW 4.0

I would like to find out information on how to tell the report what day it is today - and for example calculate 'x' days prior to today date.

i want text boxes finding n andout what range range they fall i display the correct words.

eg: if transaction is made 8 days prior to todays date, read: '8 days old'

if transaction is made 14 days prior to todays date, read: '14 days old'

if transaction is made 28 days prior to todays date, read: '28 days old'

etc..

is it possible

Thanks a lot C any help would be appreciated!

Poy.



Re: Crystal Reports for Visual Studio Dates in CRW 4.0

Manish Joisar

I am not aware about this that it will work for CRW 4.0

Create new formula

TOTEXT(DateDiff ('d' , date('07/15/2007'), CurrentDate), '###')+ ' days old'

You can see this link for more details

http://www.vbforums.com/showthread.php t=374226

Hope it helps






Re: Crystal Reports for Visual Studio Dates in CRW 4.0

Poy

Hi,

thanks for the post - it didn't actually work on the v.4.0, however i discovered another way:-

new formula:

if day({date.field}) > 7 then '7days old'

i need to play a little more, beacause the results are not 100% yet.. i think i have to

define the current date somehow!

Not sure how yet - any ideas

thanks again.