asg09asdg709asd7g
asg09asdg709asd7g

Reputation: 3

Crystal Reports: How do I read a datetime parameter from SQL?

I have a formula field that basically does the following:

If {Date Field} = "1753-01-01 00:00:00.000" Then
""
Else
{Date Field}

I keep getting the error that I need to use an actual date-time formula. It's really annoying and I don't know what to do! I have tried certain nests to use around the date but they don't seem to work. Hoping one of you know a simple answer.

Upvotes: 0

Views: 52

Answers (1)

dotjoe
dotjoe

Reputation: 26940

Date literals can be defined using the #date# notation. Then your else statement needs to be converted to text.

If {Date Field} = #1753-01-01# Then
""
Else
ToText({Date Field})

Upvotes: 1

Related Questions