|
-
Nov 14th, 1999, 04:27 AM
#1
Thread Starter
Junior Member
I have a problem retrieving date from database .
And it dosen't happen in every computer.the problem is when I enter date 01/05/1999 and save it in access.After that i retrieved it but it became 05/01/1999.How can i solve this.It's make my program incorrect..Has anybody found this problem or someone can solve it .Please help me
-
Nov 14th, 1999, 06:03 AM
#2
Dates in an Access database are m/d/y. How are you reading the date? Can you post some of your code?
------------------
Marty
-
Nov 14th, 1999, 06:10 AM
#3
Thread Starter
Junior Member
I put the data from recordset to text box directly.
for example :
Maskbox1.text=Format(Rs!DocDate,"dd/mm/yyyy")
-
Nov 14th, 1999, 12:07 PM
#4
Addicted Member
Hi there..
1- Try entering you dates as 12/28/1999 to avoid confusion while designing/testing.
2- In your code: Maskbox1.text=Format(Rs!DocDate,"dd/mm/yyyy") Try "mm/dd/yyyy".
Good Luck.
-
Nov 14th, 1999, 01:40 PM
#5
Addicted Member
Your quite correct that dates are coming from some machines in dd/mm/yyyy format. I have the reverse problem with some machines giving me dates in mm/dd/yyyy format.
The problem is dates in the good ol USA are expressed as month day year, whereas in the rest of the world the standard day month year.
Our answer is that our America clients switch there PCs (regional settings) to Australian date formats. Perhaps you have some PCs set to ozzie or british settings.
-
Nov 14th, 1999, 02:12 PM
#6
New Member
Try changing your date field to a text field and manipulate the dates in VB code!
Works for me!
-
Nov 15th, 1999, 03:06 AM
#7
Thread Starter
Junior Member
Thank you very much everybody for replying my question. I think my problem have caused like jritchie said but althought I changed the regional setting to be the same in 2 computers.It does't work.(It's still the same) I doubt that it's cause by machine or window version.
-
Nov 15th, 1999, 06:21 AM
#8
Addicted Member
Pavinda,
Have you got any date formating commands in the vb app, these maybe over-writing the regional settings. We finally resolved the problem by having the data packages identified as either American or Australian. A bit messy but it works.
-
Nov 15th, 1999, 11:28 AM
#9
Fanatic Member
Hey there Pavinda...
I don't know whether this would help or not.. but I've an .ocx that called Grandvida Input Control... I use it for date data...
If u want it, plz contact me ([email protected])
ok ???
Hopefully this would help you..
Brgds
Wille
Junior VB Programmer
-
Nov 15th, 1999, 12:17 PM
#10
Lively Member
hello Friends
This prob is of acces only. Even ifit is storing the data in DD/MM/YYYY format and works fine when u enter data directly in access is works fine, but the moment u try to access data froma vb application it creates problems, Access internally converts the date. like if u enter the date as 5/11/1999 it will change this to 11/5/199 this prob also appeares when u send a sql script using vb program or even if u use modules in access only. I too found this wrong so wheneevr i beed to wrk with access databasei store the date as number(long) in the folloing format YYYYMMDD and convert this to date format in my vb application, yes its will increase yr wrk load...but will eliminate the date problem. By using this u can also use between in the sql statement it will work fine as well as u can also sort the date on the basis of date.
Thanx Manish
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|