Hello all
How can i extract the year part of a given date field? Let say the users have a form with a date field and a submit button, they enter '20-jun-2004' or '2004/06/20' and hit submit. Is there any built-in PHP function to get the year of the date field or i have to write my own code to do this.
The date(Y) function give me the year of the local time and it would be nice to have something like date('20-jun-2002',Y) to give 2002.
Hope that someone would help me out.
How can i extract the year part of a given date field? Let say the users have a form with a date field and a submit button, they enter '20-jun-2004' or '2004/06/20' and hit submit. Is there any built-in PHP function to get the year of the date field or i have to write my own code to do this.
The date(Y) function give me the year of the local time and it would be nice to have something like date('20-jun-2002',Y) to give 2002.
Hope that someone would help me out.