esytiger202
08-04-2007, 06:20 PM
Hello all
I use a script which in some parts generates date , exactly with such format :
Aug-4-2007 09:05:23 PM
I searched inside the script to find any php date format like ('D M d, Y g:i a')
which generates Aug-4-2007 09:05:23 PM but I didnt find ,
something that I found is now(); from mysql,
1-How can I change this format?
2-I omite the time from date ?
Thanks all :) (im not a php coder :o )
rafiki
08-04-2007, 06:27 PM
there are mysql functions out there to format a date, what does now() return?
esytiger202
08-04-2007, 07:22 PM
there are mysql functions out there to format a date, what does now() return?
it returns date and time
Aug-4-2007 09:05:23 PM
I need the date in different format also the time,
I changes all now() to CURDATE() but the returns didnt change
Len Whistler
08-04-2007, 07:39 PM
The php code below is = to August 4, 2007. Check the php manual - or a book - for more date and time functions.
date('F j, Y');
To format dates with DATE_FORMAT() from a MySQL database the input has to be YYYY-MM-DD HH:MM:SS
esytiger202
08-04-2007, 09:05 PM
The php code below is = to August 4, 2007. Check the php manual - or a book - for more date and time functions.
date('F j, Y');
To format dates with DATE_FORMAT() from a MySQL database the input has to be YYYY-MM-DD HH:MM:SS
There is no date format in all script, only now() function
guelphdad
08-04-2007, 10:57 PM
so change now so that you use DATE_FORMAT along with NOW(). by the way NOW will not output the date in the way you have shown it will only output yyyy-mm-dd hh:mm:ss and no other format unless you use date_format
show us your acutal code in that part of the script rather than us guessing.