Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I would like some help trying to create a variable for the last working date. It must also include public holidays which i already have in a spreadsheet.
I am trying to add a button in my application for LWD (Last Working Day) which when pressed the date selection changes to the last working date.
My fields are :
[Event Date]
PublicHols
I know there is a function NETWORKDAYS but i don't know where to start...
Any help would be appreciated.
Thanks
The lastworkdate is probably the function you're looking for. It also excepts holidays are arguments. See the help file for details.
Hi thanks,
I dod't understand it though. how do i get the last working date?
the example gives..
lastworkdate ('2007-02-19', 9) which returns '2007-03-01' which is a date in the future...
so if i try
LastWorkDate(Today(),-1) i get null
or am i completely missunderstanding it?
Even if this sounds non intuitive, I think you should look into FirstWorkDate() instead, like
=FirstWorkDate(today(),1)
add a comma separated list of holiday dates after the second argument.
Hi, thansk that worked
how do i use a field name for my holiday dates?
I have loaded them in from an excel file and named the field 'PublicHols' but not sure how to include it
The help file says to use this format...
FirstWorkDate(end_date, no_of_workdays {, holiday} )
so i have tried
=FirstWorkDate('07/12/2012',2{, PublicHol})
but i get an error on the comma after the curly open bracket..
{, ...} just means it's optional to the function call.
Here is a description on how to create and add your holiday values: