4 posts • Page 1 of 1 [Solved] Calculate current date minus 1 year in Query. Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies) Discussion started by: slashdotweenie. getYear() Example: In the following web document getYear() method returns the current year according to local time. The unit is the interval unit that expr should be interpreted e.g., DAY, HOUR, etc. In other words, current year - 1950. Shell Programming and Scripting. During a recent project, I found the need to check if rows in a database were more than 6 hours old. adding 1 year to current date I need to know how to add 1 year to a start date in this formatfor example:if the start date is December,15 2000 I would like to generate the expiration date to be Deember 14 2001thanks Syntax. Topic: JavaScript / jQuery Prev|Next. The DateInterval class was introduced in PHP version 5.3.0 and its purpose is to represent a date interval. =DateAdd("q", 3, [PromisedDate]) Displays a date that is three quarters after the value of the PromisedDate field; for example, if the value of the PromisedDate field is 18-Jun-03, the expression will evaluate to 18-Mar-04. Add number of days in current date: php strtotime add days (Example: adding 5 days) I am sure that there are other ways to do this. Learn how to adding 1 year to date, php date add 1 year, PHP date add year function, php tutorial for beginner, start learning php language, how to start php programming language. See the following code- To display current year is very easy and simple in PHP. Add number of years in current … This means that e.g. The PHP mktime() function returns the Unix timestamp for a date.