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

urgent Formula

Status
Not open for further replies.

fhurmuzlu

Programmer
Nov 16, 2004
52
US
I have WEDATE Table which has a field called WKEND , I need to read the table and print Weekend dates for a month.please I need help. by the way the table is string but it is Date table.
 
I use Crystal 8.5 using an Oracle database via ODBC connection.

Try this

DayOfWeek({table.date}) in [1,7]

Without more technical information, not sure if this is enouogh. See FAQ149-3762
 
Missed a piece

It would help if you gave the layout format of the date string.

Depending on the format, such as MMDDYYYY, create the following formula, WKEND


Code:
//@WKEND - Change string date to actual date
numbervar d := tonumber(left({WEDATE.WKEND},2));
numbervar m := tonumber(mid({WEDATE.WKEND},3,2));
numbervar y := tonumber(right({WEDATE.WKEND},4));

date(y,m,d)

In record selection, add the following to get the weekend dates
Code:
DayofWeek({@WKEND}) in [1,7]


-LW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top