473,473 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

to change the format of the date in mysql to dd/mm/yyyy

283 Contributor
hi friends,
i imported my database from ms access to mysql, there is a problem though the date in mysql has the format (yyyy-mm-dd) and i want to change it to dd/mm/yyyy.how can i do it?i am using phpmyadmin(wamp) to manage my database.please give me a solution to convert the date format from my phpmyadmin.thanks.
regards,
ajos
Oct 16 '07 #1
5 23597
ronverdonk
4,258 Recognized Expert Specialist
The DATE data type in MySQL has the format YYYY-MM-DD. But you can re-format the database stored date into DD-MM-YYYY after date calculations and before you display it.

Ronald
Oct 16 '07 #2
ajos
283 Contributor
The DATE data type in MySQL has the format YYYY-MM-DD. But you can re-format the database stored date into DD-MM-YYYY after date calculations and before you display it.

Ronald
thanks Ronald for the reply can you please elaborate more on this...how should i do that..im using phpmyadmin.
regards,
ajos
Oct 16 '07 #3
bartonc
6,596 Recognized Expert Expert
hi friends,
i imported my database from ms access to mysql, there is a problem though the date in mysql has the format (yyyy-mm-dd) and i want to change it to dd/mm/yyyy.how can i do it?i am using phpmyadmin(wamp) to manage my database.please give me a solution to convert the date format from my phpmyadmin.thanks.
regards,
ajos
date_format()
Expand|Select|Wrap|Line Numbers
  1. SELECT date_format(dateField, '%d/%m/%Y') as Trans_Date;
Oct 16 '07 #4
ajos
283 Contributor
date_format()
Expand|Select|Wrap|Line Numbers
  1. SELECT date_format(dateField, '%d/%m/%Y') as Trans_Date;
thanks bartonc for the prompt reply,
i did something like this
Expand|Select|Wrap|Line Numbers
  1. select date_format(dateField,'%d/%m/%y')as trans_date;
but it gave me an error something like datefield not known.
then i did something like this-->
Expand|Select|Wrap|Line Numbers
  1. select date_format(now(),'%d/%m/%y')
  2.  
it served the purpose.
anyways thanks to your answer i got the hint.
regards,
ajos
Oct 16 '07 #5
pbmods
5,821 Recognized Expert Expert
Heya, ajos.

MySQL has a system variable called datetime_format.






But it hasn't been implemented yet.
Oct 16 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Karam Chand | last post by:
Hello Is there anyway to change the default date format (possibly in a .ini or .cfg file) from YYYY-MM-DD to another format ? (ie, mm/dd/yyyy or any user-defined format). The useage that I'm...
4
by: MyOracle | last post by:
Hi everybody, I just curious about change date(0000-00-00) to date (00-00-0000) in mysql.Can anyone tell me about that. Thanks. izmanhaidi.
1
by: Laurence Neville | last post by:
This is regarding a change in the Short Date format under Hebrew Regional Settings, that has caused huge problems in our ASP web application. The change appears to have been introduced sometime...
13
by: Roy | last post by:
Hi all, I'm creating a project that should always use this date format when displays the dates or create dates. The back end database is a SQL Server and I like to know what is the logical way...
1
by: Rotsj | last post by:
Hi, i'm using visual foxpro 9 with a mysql 5 database, for direct access to my database i use navicat. In visual foxpro i've set my date format to dd-mm-yyyy, also i did this in navicat. However...
1
by: G Gerard | last post by:
Hello I am having some problem comparing dates with the SQL statement below MySQL = "SELECT Format(Date, 'yyyy/mmmm/dd') as FROM TblDates WHERE _ Format(Date, 'yyyy/mmmm/dd') =...
8
by: Tony B | last post by:
I have a string in a existing php script which is in the form "dd/mm/yyyy" and I need to convert it into a suitable format for mysql which is "yyyy-mm-dd" Is there a neat way of doing this in php ?
0
by: modolamara | last post by:
Hi people, im importing a date column from a mysql database to a datagridview but it automatically changes the date format from 'YYYY-MM-DD' (Mysql format) to 'MM/DD/YYYY' since the user has...
2
code green
by: code green | last post by:
I know this is simple but I have been using mssql for so long I have forgotten how to do it in MySql. I am reading a date from a CSV file of the format How do I convert this to ISO 8601 standard...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.