02-05-2014 04:24 AM
Please assist.I could not use INTCK function as there's only one column from which i need the calculation to start if the day is weekday.
02-05-2014 05:25 AM
Sorry, I don't understand your issue.
Please post some sample input and desired output data.
02-05-2014 05:36 AM
Please see the two columns below. Column 2 is a calculated field which should show as Y for weekday and N for weekend/holiday. However it is showing as Y for 25th & 26th Jan which are weekends. How do i exclude weekends before i start the calculation.
|Column 1||Column 2|
02-05-2014 06:27 AM
Ok, if you are relying on US holidays, use the holiday() function.
If not, you need some kind of calendar data set/user defined format to handle holidays outside the US.
02-05-2014 06:31 AM
Thanks. How can i exclude weekends from the colum 1 having date & time?
02-05-2014 06:34 AM
Depending on your final technique, but usually involving the datepart() function can be of help.
02-05-2014 08:33 AM
Further, the weekday() function returns a day number (1-7) which you can test to exclude weekends.
02-05-2014 08:38 AM
If you're looking for a way to calculate "working days" (calendar days minus weekends and holidays), perhaps you can use this custom networkdays function:
02-05-2014 08:58 AM
That worked. Thank you Amir.
That would be my next step. Will check the custom networkdays function. Thank you.
12-11-2014 11:10 AM
Take a look at the WeekDay() function. Give a date value, it returns 1-7, where 1=Sunday, 7=Saturday indicating the day of the week
To convert from Date-Time, use the DatePart() function,
isweekday = (WeekDay(DatePart(dtvalue)) IN (2..6)); * think I got the parens right ;
returns, 0 (false), or 1(true).