English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

im having a problrm making my date sohw the way i want it to, its showing like this.... 0000-00-00 00:00:00 but i want it like January 25,2007 11:20:49PM EST can someone please help me?

2006-10-14 17:08:46 · 4 answers · asked by mankeluvsit 1 in Computers & Internet Programming & Design

ok, what do i set my Type as in MySQL though?????

2006-10-14 17:22:21 · update #1

Heres something else...
$date=$r['date'];
$date=($date);
thats my code for it

2006-10-14 17:23:13 · update #2

ok the reason im telling you this is because when i do what you said, it will show every post i mean the same time.... thay why i asked mysql

2006-10-14 17:31:41 · update #3

4 answers

Hey, If u try to save date in any other format than the mysql default, it will be saved as 0000-00-00 00:00:00. So u must save in the database in format 0000-00-00. U r to manipulate it in front end. See mysql manual for detail.

2006-10-15 07:02:09 · answer #1 · answered by binaryFusion 5 · 0 0

MySQL puts the date in UNC format. I don't believe there is a way to change that behaviour.
yyyy-mm-dd hh:mm:ss (24 hour format)

However, you can convert it to the way you want in the 'front' end of your application. Check out the date functions in the programming language of choice.

For PHP:
http://www.php.net/manual/en/function.date.php

For Javascript:
http://www.w3schools.com/jsref/jsref_obj_date.asp

2006-10-15 00:17:11 · answer #2 · answered by FireMelon 2 · 1 0

just 'scrub and edit' it to the format of your choice using the date functions in whatever dev tools you are using.

also MySQL fixed some of this in 5.0 and also in 4.1. r u using an older version?

2006-10-15 00:42:52 · answer #3 · answered by Anonymous · 0 0

CONVERT(VARCHAR, columnname, 109)

2006-10-17 11:52:39 · answer #4 · answered by supradeep 1 · 0 0

fedest.com, questions and answers