Nandini Posted October 14, 2008 Share Posted October 14, 2008 Hi I have a file named as "14-10-08-12-45-52". here 14=>Date 10=>Month 08=>year 12=>Hours 45=>Minutes 52=>Seconds I wanto display this file name as Tue Oct 14 12:45:52 PM 2008 i want to do this using php Can any one help me Thanq Quote Link to comment https://forums.phpfreaks.com/topic/128333-solved-php-date-and-time/ Share on other sites More sharing options...
Daniel0 Posted October 14, 2008 Share Posted October 14, 2008 You can use strtotime(). You could also split it up using explode() and insert the various values into mktime(). Either of those two will give you a Unix timestamp. Then you just need to format it using date(). Quote Link to comment https://forums.phpfreaks.com/topic/128333-solved-php-date-and-time/#findComment-664783 Share on other sites More sharing options...
Nandini Posted October 14, 2008 Author Share Posted October 14, 2008 Thanq very much Daniel0 I will try to solve this problem as per your suggetions. Quote Link to comment https://forums.phpfreaks.com/topic/128333-solved-php-date-and-time/#findComment-664786 Share on other sites More sharing options...
Nandini Posted October 14, 2008 Author Share Posted October 14, 2008 Hey, its working fine thanx Daniel0 Quote Link to comment https://forums.phpfreaks.com/topic/128333-solved-php-date-and-time/#findComment-664879 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.