getQuarter

Modified on Tue, 22 Aug 2023

Description

Use this function to get the year quarter of the given date.

Syntax

getQuarter(date)

Returns

Return ValueDescription
NumberReturns the year quarter of the given date.

Sample

ExampleResultDescription
getQuarter(2023-04-08)2023Q2The function extracts the year and quarter from the date and returns it as '2023Q2'.

To view all the Date functions, click here.

See Also