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

Date formula using color

Status
Not open for further replies.

stephm923

Programmer
Nov 28, 2006
9
0
0
US
I'm trying to do a formula in Crystal 10.


I want to highlight lines that have a ymdend >= {@EFFDATE} and <= "last day of month of {@EFFDATE}"

For instance, I want the lines to be highlighted when the ymdend is between 08/01/2006 and 08/31/2006.

This is what I have so far....
IF {vADV_RX_LICENSE.RX_LICENSE_YMDEND} = {@EFFDATE} and
{vADV_RX_LICENSE.RX_LICENSE_YMDEND} <= ??? THEN CRSILVER ELSE CRWHITE

**ymdend is a datetime field
 
We don't know what's in {@EFFDATE}, nor it's data type (date or datetime?).

This should work though:

IF {vADV_RX_LICENSE.RX_LICENSE_YMDEND} = {@EFFDATE}
and
{vADV_RX_LICENSE.RX_LICENSE_YMDEND} <= dateserial(year({@EFFDATE}),month({@EFFDATE})+1,1)-1 THEN
CRSILVER
ELSE
CRWHITE

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top