• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

Date Format

Is there anyway to store date in any format other than
mm/dd/yy in the database (using sql stmts only) .i am using sql server as my my backend and vb as frontend.
  • 2
1 Solution
BrindhaAuthor Commented:
Edited text of question.
SQL server stores dates / datetimes in it's own way, I don't really understand why you would want to store them differently. It is very easy to handle displaying/editing dates in any format you like at the front end. In fact it is better to do it like that because it increases the independence of the back end. If you could explain a little more of your problem / reason for wanting this I will try to help.
Try to put this in your source code:
YourDB_Object.Execute "SET DATEFORMAT  'dmy'". Be sure the table is date type.

You must put inside 'dmy' the format that you need.

Hope this helps!!.
BrindhaAuthor Commented:
Even if take care to retrieve dates in my custom in the frontend,i do often get problems.For example,in the frontend if i enter in dd/mm/yy format
while retriving there do occur errors.That is 3rd Feb gets displayed as 2nd march.This continues while updating too.I am very sure that there is no problem in frontend coding.

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now