datetime format

  • Thread starter Thread starter Esref Durna
  • Start date Start date
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
 
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.
 
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
 
Back
Top