Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
FirstWorkDate(Today(), 1, ’04-Jul-2014′)
Note: Today is 6th July 2014.
This function returns 03-Jul-2014 because 06-Jul-2014 is Sunday, 05-Jul-2014 is Saturday and 04-Jul-2014 is a holiday
if it is 2015 on the same date how can i go back to application and edit 2015 instead of 2014??
is there any solution to write with out years??
What are you trying to solve with this? Do you only want to use this specific date? Is there a range of years you'd like to use? There are a few ways to accomplish what you're looking to do, but more details are needed.
actually i want to display previous day data like Monday to Friday avoid Saturday and Sunday
->for above requirement i already wrote a expression by using Firstworkdate()
but now i want to avoid holidays also !!!
Refer this post:Calculating Holidays in script
Hope this helps.
You can also go out and scrape government websites too to get a list, depending on your location as well, to get a list of holidays. The put them into a variable and use the variable in your calculation.
firstworkdate(Today(), 1, $(vHolidays))
I've attached an example for getting the data.