Jump to content


Photo

date("d-m-Y") outputs "03-07-2006" ... how can I make it output "3-7-2006"?


  • Please log in to reply
2 replies to this topic

#1 Isoss

Isoss
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 03 July 2006 - 11:18 AM

I need to get digit between 1 - 9 be displayed without the 0 on the left. How can I do it?

Thanks.

#2 Chips

Chips
  • Members
  • PipPipPip
  • Advanced Member
  • 68 posts

Posted 03 July 2006 - 11:27 AM

www.php.net - date function:


n - Numeric representation of a month, without leading zeros 1 through 12

j Day of the month without leading zeros 1 to 31

link:
http://uk.php.net/ma...nction.date.php

date("j,n,Y"); would give d, m, yyyy

A lil bit of research

#3 Isoss

Isoss
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 08 July 2006 - 10:36 PM

Thanks a lot ... actually I searched but couldn't find anything like that! maybe I just missed it. Thanks again!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users