Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Setting Default Vale of a parameter to currentDate Post Reply Post New Topic
Author Message
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Topic: Setting Default Vale of a parameter to currentDate
     Posted: 15 Feb 2011 at 6:19am
I am using CR 2008, and i am trying to set the default value to the current date.

I have found a couple places on the internet that have said to set a blatantly wrong like 01/01/1990. Then you can create a formula that  checks for that date and then sets it to the current date. This is the IF statement i wrote that returns me 01/01/1990. The same date i hard coded.

if {?Date} = Date (1990, 01, 01)
    then  CurrentDate
else
    {?Date}

any suggestions?
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 15 Feb 2011 at 6:26am
yeah so i figured it out, apparently 1900 and 1990 are not event close to the same date :)

IP IP Logged
Printable version Printable version

Forum Jump
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