RE: Date and Time with AM/PM

RE: Date and Time with AM/PM

 

  


Use a datetime field, and just insert the value as '12-06-2005 12:25:60'

Then when selecting it, see the "DATE_FORMAT" mysql function, or if you use PHP, format the datetime after you select it using the "date()" function

-----Original Message-----
From: Rahul [mailto:mysqldba-ezmlmshield-x45263149.[Email address protected]
Sent: Thursday, June 09, 2005 07:40 AM
To: LazyDBA Discussion
Subject: Date and Time with AM/PM

Hi Guru's,

How to insert datae and time with AM PM in mysql database.
like create one table which has column date_test datetime data type and insert statement is

insert into Test_Date(date_test) values(str_to_date('12-06-2005 12:25:60 AM','%m-%d-%Y %T %p'));

but the output on the above insert statment is not which i want

i'm trying for the following output
02-06-2005 12:22:09: AM --- (either PM)

please help me in these case.....

i'm using str_to_date() function but not getting the output as same i want.



Regards
Rahul Chaudhari

----- Original Message -----
From: "Rahul " <mysqldba-ezmlmshield-x68612507.[Email address protected]
To: "LazyDBA Discussion" <[Email address protected]
Sent: Monday, May 02, 2005 9:02 AM
Subject: Backup in mysql


> Hi all,
>
> is there in free GUI tool for MySQL database to work on.
>
> i'm trying to use navicat(free software) but the problem is that whenever i start navicat software it's starts fine but as soon as i connect to any database through navicat my MySQL service gets stop. means it does allow me to connect to any database.
>
>
> Regards
> Rahul Chaudhari
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To unsubscribe, e-mail: mysqldba-[Email address protected]
> Website : http://www.LazyDBA.com
>


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mysqldba-[Email address protected]
Website : http://www.LazyDBA.com



MySQL LazyDBA home page