Jump to content

[SOLVED] Formatting a date


Canman2005

Recommended Posts

Hi all

 

I have two varibles, one called

 

$cycle_through_the_month

 

and another called

 

$display_month.

 

"$cycle_through_the_month" displays a date, such as "5" for the 5th day, "18" for the 18th day and so on

 

"$display_month" displays a month and year, such as "MARCH 2007" or "NOVEMBER 2007".

 

Combined together like "$cycle_through_the_month $display_month" produces something like 2 APRIL 2007 or 26 JUNE 2007.

 

What I want to do is to format these so that they print out like

 

02/12/2007

 

or

 

29/11/2007

 

Is this possible? Can anyone help?

 

Thanks in advance

 

Ed

Link to comment
https://forums.phpfreaks.com/topic/46293-solved-formatting-a-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.