Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Change Date to NULL value Post Reply Post New Topic
Author Message
Radar
Newbie
Newbie
Avatar

Joined: 22 Jun 2010
Online Status: Offline
Posts: 1
Quote Radar Replybullet Topic: Change Date to NULL value
     Posted: 13 Dec 2012 at 4:22am
i am creating a report in CR 2008, where if an object is not closed it will auto input a date as
1/1/1900  12:00:00 AM
i want to change this field to display as "NULL"
 
I have tried
 
and
if {vANDON_REQUEST.CLOSE_DT} = '1/1/1900  12:00:00 AM' then 'NULL'
 
but i keep getting a date-time is required here error.  I have tried altering the way the date is displayed and even tried putting in a date time function to no avail.... can anyone assist me in getting this field to show as blank??
 
Thanks in advance!
IP IP Logged
aharonmc
Newbie
Newbie


Joined: 02 Apr 2012
Location: United States
Online Status: Offline
Posts: 10
Quote aharonmc Replybullet Posted: 13 Dec 2012 at 8:43am
if {vANDON_REQUEST.CLOSE_DT} = '1/1/1900 12:00:00 AM'
then date(0,0,0)
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 13 Dec 2012 at 8:51am
if totext({vANDON_REQUEST.CLOSE_DT}) = '1/1/1900 12:00:00 AM') then 'null'

Edited by comatt1 - 13 Dec 2012 at 8:51am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Dec 2012 at 8:57am

maybe this?

if {vANDON_REQUEST.CLOSE_DT}=date(0,0,0) then 'NULL' else totext({vANDON_REQUEST.CLOSE_DT},"M/d/yyyy")
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 13 Dec 2012 at 9:01am
Did you want to actually display 'Null' or blank, your initial post, Radar, says both.

Edited by comatt1 - 13 Dec 2012 at 9:02am
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