datetime format

E

Esref Durna

my sql server have this datetime format ( yyyy-mm-dd )
how could i change it to dd.mm.yyyy format
or what should i do?


thanks
 
D

Dhaval Faria

I also had a same prob with the dateformat in my application, for this what
I did, I used datetimepicker control, and I get data from SQL Database to
the datetimepicker and then can easily get the format dd/mm/yyyy or
alternate way is to store date in string format in SQL Database and then get
it from the database and if you store date in SQL Database as dd/mm/yyyy
itself then no need to convert but, if its in mm-dd-yyyy then take it in
datetimepicket control and then you can get date in format you want.. it can
be done by the following way...

datetimepickercontrol.values.day & "/" & datetimepickercontrol.values.month
& "/" & datetimepickercontrol.values.year

this gives date in DD/MM/YYYY format.

Hope this helps.
 
B

Bernie Yaeger

Hi Esref,

Check the region settings on the server where sql server resides - it
probably is set to a region setting yyy-mm-dd. Simply change that and the
basic datetime format in sql server should change also.

HTH,

Bernie Yaeger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top