BusinessDate |
|
Description
Returns the most recent past date that was a valid business day relative to a specific input date.
Arguments
1.BusinessDate - Name of the Macro.
2.Input Date - The date to process. For example 01-Jan-2013.
3.Input DateTime Format - The .NET format string for the input date. For example dd-MMM-yyyy.
4.Output DateTime Format - The .NET format string for the output date. For example dd-MMM-yyyy.
5.Offset Days - The number of days by which to offset the input date. For example 0.
6.Filter - The values are UMTWRFS as found in s[U]nday, [M]onday, [T]uesday, [W]ednesday, thu[R]sday, [F]riday, [S]aturday.
Examples
[BusinessDate|31-Mar-2013|dd-MMM-yyyy|dd-MMM-yyyy|0|MTWRF]
March 31st is a Sunday, the filter is examining MTWRF, the most recent past weekday would be Friday, so the resulting output would be Friday's date 29-Mar-2013.
[BusinessDate|31-Mar-2013|dd-MMM-yyyy|yyyy-MM-dd|0|MTWRF]
The resulting output would be 2013-03-29.
[BusinessDate|31-Mar-2013|dd-MMM-yyyy|yyyy-MM-dd|-2|MTWRF]
March 31st is a Sunday, the filter is examining MTWRF, the most recent past weekday would be Friday, the number of offset days is -2, so the resulting output would be Wednesday's date 2013-03-27.
[BusinessDate|31-Mar-2013|dd-MMM-yyyy|yyyy-MM-dd|0|MTWR]
March 31st is a Sunday, the filter is examining MTWR, the most recent past weekday would be Thursday, so the resulting output would be Thursday's date 2013-03-28.
Notes
For a complete list of formatting options see the Date and Time Format Strings topic elsewhere in help.
Copyright © 2024 pasUNITY, Inc.
Send comments on this topic.
Created with an evaluation copy of HelpSmith.
To remove this notice, you should purchase the full version of the product.