Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Format date in vb6.0 and Access

Status
Not open for further replies.

andypower

Programmer
Aug 10, 2004
23
0
0
IN
my self avi i m developing one application in vb 6 and access by using ado library.
when i m inserting record in database the date i want to insert is "09/12/2005" but it stores as "12/09/2005".
i format that date format command in dd/mm/yyyy way and even i use cdate() function but it wont work.
in sql server one can use convert() function is there any such function to use in access or suggest me any other option how to solve above problem
 
Use a non ambiguous date value when you insert date values, like this:
INSERT INTO myTable(myDate) VALUES(#2005-09-12#)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 


Hi,

FORMAT and STORE are two DIFFERENT things.

MS Dates are just NUMBERS, like right now in TEXAS its, 38607.47056 which can be FORMATTED in any number of ways for DISPLAY like 9/12/2005 11:17.

Check your Regional settings for default DATE DISPLAY FORMAT.





Skip,
[sub]
[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top