Get the First Friday of the Quarter Containing the Current Date
Problem description
The following Excel table contains a random datetime value in cell A1, as shown below:
We are trying to get the first Friday of the quarter which the above date falls in and enter the result date in cell B1, as shown below:
Directions
1. First make sure esProc add-in is already installed in Excel. If it hasn’t, refer to Use esProc Add-in in Excel to learn about the use of esProc in Excel.
2. Enter the following formula in B1: =esproc("=pdate@w(pdate@q(date(?,””yyyy/MM/dd””))+1)+5",A1). The statement enables using esProc syntax to do the calculation. First, pdate@q find the first date of the current quarter. Then get the next date of this date, find the Sunday that within the week containing the next date, and calculating Sunday plus 5 to get the target date.
https://stackoverflow.com/questions/63716685/get-the-first-friday-of-the-quarter-of-todays-date
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/