Hi everyone! i am developing an application using java and mysql as a database server. the problem is i want to change the default date format in mysql.

i created a table like this;

create table registration
(registrationNo integer primary key,
customerName varchar[50] not null,
regDate DATE not null);

so the progam only accept this date format;
2011-09-22 for the reg date

but i want the date format to be


is it possible? THANK YOU!

Recommended Answers

All 2 Replies

The mysql storage format is YYYYMMDD. If you want to enter the data in another format you have to convert it in your application to and from the target date format.

we cant modify, The server's internal representation of dates is not something
we can modify.You can change it in your application

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.