etrader Posted January 19, 2011 Share Posted January 19, 2011 Since I get numbers and date from strings, they are in an ugly raw format as e.g. "14728293" and "2011-01-19". How to make the format stylish as "14,728,293" and "January 19, 2011" Quote Link to comment https://forums.phpfreaks.com/topic/224952-modifying-the-format-of-date-and-numbers/ Share on other sites More sharing options...
bh Posted January 19, 2011 Share Posted January 19, 2011 Hi, eg with number_format and date_format: number_format(14728293, 0); date_format(new DateTime('2011-01-19'), 'F d, Y'); Quote Link to comment https://forums.phpfreaks.com/topic/224952-modifying-the-format-of-date-and-numbers/#findComment-1161850 Share on other sites More sharing options...
etrader Posted January 19, 2011 Author Share Posted January 19, 2011 Absolutely marvelous! exactly what I needed ... thanks a million! Quote Link to comment https://forums.phpfreaks.com/topic/224952-modifying-the-format-of-date-and-numbers/#findComment-1161853 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.