cancel
Showing results for 
Search instead for 
Did you mean: 

Date Functions

Former Member
0 Kudos

I am trying to find some dates. I need to find the 1st day of the current quarter, 1st day of the year, 1st day of the previous month and the last day of the previous month. Any help on these would be greatly appreciated. Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I was able to figure out the 1st and last days of the previous month. I am still stuck on the 1st day of the current quarter and the 1st day of the year. Thank you.

Former Member
0 Kudos

Hi Thomas,

You can get the first day of the year by creating a formula as:

date(year(currentdate),01,01);

Regarding the 1st day of the current quarter, create a formula for getting the quarter as :

if month({date field}) in [1, 2, 3] then "Q1" and similarly for Q2, Q3 and Q4.

Once you have the quarter get the first day by creating a formula as:

if month(date field) in 1 to 3 then

date(year(currentyear),01/01) else

if month(date field) in 4 to 6 then

date(year(currentyear),04/01)

Regards,

Nrupal

Former Member
0 Kudos

I would modify quarters slightly to

if month({date field}) in 1 to 3 then

date(year({date field}),01,01) else

if month({date field}) in 4 to 6 then

date(year({date field}),04,01)

if month({date field}) in 7 to 9 then

date(year({date field}),07,01)

if month({date field}) in 10 to 12 then

date(year({date field}),10,01)

and beginning year to

  date(year({date field},01,01);

Answers (0)