GRIDPLUS2 - Date Calculation Command | ![]() |
||||||
|
Usinr the GRIDPLUS gpdate Command |
The GRIDPLUS gpdate command returns a date value (in "-dateformat") that is a specified increment from a specified date.
Syntax:-
gridplus::gpdate ?action? ?date?
Action | Value |
@ | date (default). |
+days | date + days. |
-days | date - days. |
>months | date + months. |
<months | date - months. |
The default date is the current date. If a date is specified it must be in the format specified by -dateformat.
Examples
Note: These examples assume that the current date is 31st December 2011 and that the -dateformat is "us".
Command | Value |
gpdate | 12/31/2011 |
gpdate @ | 12/31/2011 |
gpdate +7 | 01/07/2012 |
gpdate >12 | 12/31/2012 |
gpdate -2 | 12/29/2011 |
gpdate <1 | 11/30/2011 |
gpdate +14 01/14/2012 | 01/28/2012 |
gpdate <24 01/14/2012 | 01/14/2010 |