Assuming you're using MySQL, try MONTH().  As in:

SELECT MONTH(SomeDateField) FROM SomeTable

If this isn't a database question, but a general PHP question, try this:

// For numeric month without leading zero, use "n"
echo date("n", strtotime($subscription_begins));


= = = Original message = = =

I have a $subscription_begins variable.  It the date type.  YYYY-MM-DD

How may I find out the month value (1 to 12) of this variable?


Sent by ePrompter, the premier email notification software.
Free download at

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to