Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi ,
i have a field name with different days.
i want to calculate the (day and day -1) date for a pariticular date selected..
for example if i select the 02/01/2013 and i want to calucate the previous 2 days or 1 day value.
if i use max(date)--- gives one date
if i use date(max(date)-1-- it gives 01/31/2013..
but if the day falls on sat or sun it has to show the friday value ..
is there any function for calculating the value for only working days...
or
i have a one month date from 01/01/2013 to 01/31/2013
when the user selects a particular date i have to caluate the that days value and previous days value...
but the problem is i want to caluate only for weekdays..
so what should be the expression for previous days calculation ....
Hi
Use the following to get the prior working day:
FirstWorkDate(Date(Today(1) - 1), 1)
If you have holiday dates in a quoted, comma separated list in variable vHolidays*, then you can use this format to take holidays into account as well;
FirstWorkDate(Date(Today(1) - 1), 1, $(vHolidays));
For more information on QV working day functions, check out here.
Hope that helps
Jonathan
* ie something like this:
Set vHolidays = '2013/01/01', '2013/03/27', '2013/05/01';
Hi,
Let try with NetWorkDays (start:date, end_date {, holiday}) :Returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holidays. All parameters should be valid dates or timestamps.
Regards,
Sokkorn
Hi
Use the following to get the prior working day:
FirstWorkDate(Date(Today(1) - 1), 1)
If you have holiday dates in a quoted, comma separated list in variable vHolidays*, then you can use this format to take holidays into account as well;
FirstWorkDate(Date(Today(1) - 1), 1, $(vHolidays));
For more information on QV working day functions, check out here.
Hope that helps
Jonathan
* ie something like this:
Set vHolidays = '2013/01/01', '2013/03/27', '2013/05/01';
Thank You guys...:)