Home : GDATE
Q10733 - INFO: GDATE

GDATE returns the start date or end date for the specified group/offset.

SYNTAX:

GDATE(Start/End Flag,Grouping/EndDate, GroupOffset/StartDate, optional Format) 

Start/End Flag:  Enter 1 to get the start date. Enter 2 to get the end date. All other numbers may return unknown results.

Grouping/EndDate: Used to set which dates to calculate the stat for.  If the Grouping is a date literal string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the end date to calculate the stat for. Common Groupings are:

"D" Days
“M” Monthly 
"R" Report Dates
Click here for available Grouping options

GroupOffset/StartDate: Used with the Grouping parameter to set the dates to calculate the stat for.  Sets the number of Groups (set by the Grouping Parameter) to be added to set the dates.  See examples below. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the start date to calculate the stat for.

Format:  The format that the date will be outputted. See here for format explanation. This is an optional parameter.

NOTES:

Start dates and end dates can be changed when choosing the dates you are reporting. This will changed the output of this function automatically.

EXAMPLES:

In the above example the cells contain (from top to bottom):

GDATE(1,"M",1)  Returns the start date in standard format

GDATE(2,"M",1)  Returns the end date in a standard format

GDATE(1,"M",1,"MM/DD/YYYY")  Returns the start date in a specified format

GDATE(2,"M",1,"MM/DD/YYYY")  Returns the end date in a specified format

GDATE(1,"M",1,"DD")  Returns only start day.

GDATE(2,"M",1,"DD")  Returns only the end day.

Download Example Template: Help_GDATE_Examples.ss3 (Click here for download instructions)

See Also: Locate Date

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 2/11/2008 12:21 PM.
Last Modified on 4/17/2019 11:48 AM.
Last Modified by Scott Dorner.
Article has been viewed 6130 times.
Rated 8 out of 10 based on 3 votes.
Print Article
Email Article