Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3rd party output default values

Status
Not open for further replies.

smbrooks0307

Technical User
Oct 2, 2012
3
US
Good morning, I am extracting data from a third party software application and have noticed that the output for a blank value is 01-Jan-1753. I need to write a formula that would take this value and change it to be a blank field and am not sure how to write it. Any help would be greatly appreciated! thanks
 
I failed to mention that I am using Crystal Reports XI to extract the data. The "blank" date is coming back with 01/1/1753 12:00:00AM for which I would like to actually write to come back with a blank cell. Thanks!
 
Try this:

if {table.datetime}=datetime(1753,1,1,0,0,0) then
datetime(0,0,0,0,0,0) else
{table.datetime}

Use this formula instead of the datetime field itself.

-LB
 
I'm not very good with Crystal reporting. I typed in the following formula for this field: if {CDASSIGN.DATE_CLOSED}=datetime(1753,1,1,0,0,0) then
datetime(0,0,0,0,0,0) else
{CDASSIGN.DATE_CLOSED}
and am still getting
DATE_CLOSED
1-Jan-1753

in my output

I have also tried:
if datetime({database_field}) = datetime(1753,01,01,0,0,0) then
""

and have also tried:
if datetime({Database_Field})=datetime(1753,01,01,0,0,0) then [Blank formula]

I'm lost
 
I might be over simplifying this, but given you want the 01-Jan-1753 to be blank, would it not be simpler to just use conditional suppression?

 
You should be creating this in the field explorer->formula->new. You can then use this formula in your selection formula if you wish or place it on the detail section. If it still does not work, change the formula to:

if isnull({CDASSIGN.DATE_CLOSED}) or
{CDASSIGN.DATE_CLOSED}=datetime(1753,1,1,0,0,0) then
datetime(0,0,0,0,0,0) else
{CDASSIGN.DATE_CLOSED}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top