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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert date field to string value 1

Status
Not open for further replies.

kkowalski

IS-IT--Management
Feb 27, 2004
5
US
I am trying to use if..then to select dates with certain criteria...
if ({CSL_STD_DEMO_SCHOOL.ENROLLMENT_DATE})<= Date (2003, 08, 20)then "2003, 08, 20" else
if ({CSL_STD_DEMO_SCHOOL.ENROLLMENT_DATE})> Date (2003, 08, 20) then {CSL_STD_DEMO_SCHOOL.ENROLLMENT_DATE}

The formula works for getting selecting dates earlier than 8/20/03 and displaying 8/20/03. IF the dates are greater than 8/20/03, I want the report to just display the date that is in the table. Do I need to convert the date value to a string value? And if so, how? If I do not, how do I get the formula to do the two things I am trying to do?

Thanks.
 
Try:

if
(
isnull({CSL_STD_DEMO_SCHOOL.ENROLLMENT_DATE})
or
{CSL_STD_DEMO_SCHOOL.ENROLLMENT_DATE}<= cDate(2003, 08, 20)
) then
cDate(2003, 08, 20)
else
{CSL_STD_DEMO_SCHOOL.ENROLLMENT_DATE}

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top