• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

Formula Error

I am trying to suppress a section where the date is not equla to 01/01/1900

What is wrong with this
({WO.CLOSEDATE}) <> Date (1900,01,01)

Gordon
0
GiaHughes
Asked:
GiaHughes
  • 5
  • 4
1 Solution
 
mlmccCommented:
Is CloseDate a DateTime?

Try this

Date({WO.CLOSEDATE}) <> Date (1900,01,01)


Are you getting an error or just not working?

DO you need those records in the report for some reason?
If not why not just filter them out?

mlmcc
0
 
GiaHughesAuthor Commented:
Very good as usual
0
 
GiaHughesAuthor Commented:
Hi mimcc

Thought it was ok said No Errors unfortuneatly when I try and run the report it says
error in file <selection_Visibility>.
Date({WO.CLOSEDATE}) <> Date (1900,01,01)
Bad date format string

Gordon
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
GiaHughesAuthor Commented:
Hi mimcc
if i change the formula to ({WO.CLOSEDATE}) <> Date (1900,01,01)

it says a string is required here

Gordon
0
 
mlmccCommented:
Apparently your dates are really strings.  

Check the format/ value and change the selection to

({WO.CLOSEDATE}) <> "01/01/1900"

mlmcc
0
 
GiaHughesAuthor Commented:
Hi mimcc

I think we are on the correct line
but it does not work in the programme
I am trying to suppress a section when the WO.CLOSEDATE is not equal to 01/01/1900
in the database the data is shown as 1900-01-01 00:00:00.000

it does not seem to affect the report which appears to suppress the section regardless

Gordon
0
 
mlmccCommented:
Is the field a DATE or a STRING?

Drop the field on the report (if it isn't already)
Right click it
Click FORMAT FIELD
Do you see the NUMBER or DATETIME tabs?

mlmcc
0
 
GiaHughesAuthor Commented:
Hi mimcc

Dont see Number or datetime tabs
In crystal reports it says it is String [22]
but in the sql databse it says it is DATETIME

So totally confused

Gordon
0
 
mlmccCommented:
Try a VERIFY DATABASE

mlmcc
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now