473,394 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

date is automatically changed

hello experts'

when the date is after the 12th of the month it is all working fine. It
only reverts to US format if the date is before the 12th.

Give solutions
Thank you
Jul 25 '06 #1
10 1955
comteck
179 100+
WHAT???

How about a little more detail explaining what your problem is.

comteck
Jul 25 '06 #2
Hi, I think I know what you are talking about and I am having the same problem, but donīt have a solution.
When working on a Spanish version of Access 2002 , I create a querydef where one of the fields is a date with criterias specified in a textbox in the format dd/mm/yyyy. When Access created the query, I open it to find that the date in the criteria had the month and the day switched automatically, but only for the dates where the day < 12......
no idea how to solve it
Dec 6 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
Hi, I think I know what you are talking about and I am having the same problem, but donīt have a solution.
When working on a Spanish version of Access 2002 , I create a querydef where one of the fields is a date with criterias specified in a textbox in the format dd/mm/yyyy. When Access created the query, I open it to find that the date in the criteria had the month and the day switched automatically, but only for the dates where the day < 12......
no idea how to solve it
I've noticed this problem myself on some databases. I usually resolve it by imposing a date format on the field in the table as it only seem to happen with controls. With an unbound control I find that imposing a format seems to work.

I don't know why it happens in some databases and not in others. I can only assume that the designer had their system settings on US format and the engine somehow remembers this. Maybe some of our other experts will have a better idea.

Mary
Dec 7 '06 #4
nico5038
3,080 Expert 2GB
Guess the problem that has costed me most of my debugging time.
In a query Access will use the US format. In such a case a date reads like:
mm/dd/yyyy
When there's a "mm" encountered > 12 Access will "know" that it's no real month but a day and swap them. Regrettably only those date fields will be swapped (others will remain unchanged) and as there's no further warning Microsoft is here corrupting the data.
The 100% solution wuld be to work only with US dates in a system where the Regional settings (From the Settings>Control panel) also use mm/dd/yyyy.

Personally I force entered dates in the format yyyy/mm/dd that will translate always correctly in a query. For other dates on forms, reports, etc. I don't use formatting as I leave it to the regional settings how dates are displayed.

Nic;o)
Dec 7 '06 #5
NeoPa
32,556 Expert Mod 16PB
The ANSI standards for SQL specify that dates should specifically be entered in m/d/y format.
This is completely independent of regional settings and is the reason I keep trying to get Mary to use the Format() function when posting answers that include dates (as well as the # delimiters).
Nico is absolutely right about the program interpreting any strings correctly when it is able to work it out without any ambiguity. I guess that a y/m/d format is also unambiguous in that not even Americans ;) would try to use y/d/m format (Although since 2000 it is necessary to use yyyy/m/d as yy can be misinterpreted as days or months for another 25 and 5 years respectively).
Personally I believe something like y/m/d would have been far more logical (it even sorts properly if required) but the fools never thought to ask me :).
Dec 8 '06 #6
MMcCarthy
14,534 Expert Mod 8TB
Ok, Ade,

If this resolves the debugging issues I've had as Nico mentioned I will pay more attention.

Nico,

I hadn't thought of that as a solution. Sounds like a great idea.

Mary
Dec 8 '06 #7
NeoPa
32,556 Expert Mod 16PB
Ok, Ade,

If this resolves the debugging issues I've had as Nico mentioned I will pay more attention.

Nico,

I hadn't thought of that as a solution. Sounds like a great idea.

Mary
Hi Mary :)
Thought you weren't on tonight.
I wouldn't recommend Nico's solution as a primary solution (please revisit updated post above re y/m/d format) as, even if it works, it is non-standard. It should work in almost all cases but if you're having to change, you may as well change to the 'standard' way.

I'm sorry Mary.
Clearly I hadn't explained this to you before - I thought I had and was confused that you didn't 'get' it. A 'senior moment' on my part obviously ;).
Dec 8 '06 #8
MMcCarthy
14,534 Expert Mod 8TB
I was at a xmas do. Just got home.

Sorry my programming was so slow to update the data you were trying to impart. :)

Have to speak to KUB about my interpretation procedures.

Mary
Dec 8 '06 #9
NeoPa
32,556 Expert Mod 16PB
I was at a xmas do. Just got home.

Sorry my programming was so slow to update the data you were trying to impart. :)

Have to speak to KUB about my interpretation procedures.

Mary
Yes, we'll get KUB to give you a small tweak.
That may put a smile on your face ;).

It seems however, that if I never explained it to you in the first place, then my confusion was misplaced.
So you're routines are still working fine :).

Hope all was fun at the party.
Dec 8 '06 #10
MMcCarthy
14,534 Expert Mod 8TB
Yes, we'll get KUB to give you a small tweak.
That may put a smile on your face ;).

It seems however, that if I never explained it to you in the first place, then my confusion was misplaced.
So you're routines are still working fine :).

Hope all was fun at the party.
Good piss up.

Lots of techie talk and plenty of gossip.

My idea of a good time.

Mary
Dec 8 '06 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Greg | last post by:
I have a page that searches a database by a repairman's name and by a date range. It pulls info by the repairman's name but pulls all info in the database regardless of the date. Below is the code...
14
by: Steve Wright | last post by:
I am trying to validate if an entry on a form is a date. I have adapted code I found here http://www.codingforums.com/archive/index.php/t-14325 as below but I can't seem the get the results that I...
7
by: Nicolae Fieraru | last post by:
Hi All, I have a table tblProducts where I have four fields:\ Index, ProductName, EnterDate (as Date/Time - Medium Date), PurchaseDate (Date/Time - Medium Date) The EnterDate is automatically...
2
by: Chuck | last post by:
Using a macro to output a query to an Excel file. Is there a way to automatically add todays date in the file spec? As: C:\Access Data\ & todays date.xls Chuck ....
17
by: Franc Zabkar | last post by:
My D-Link DSL-302G modem/router has a real-time clock whose settings are volatile. To avoid hand keying the date/time via the modem's JS interface, I wonder if there is a way to copy the JS code to...
13
by: priyasmita_guha | last post by:
Here is a program- /* PROGRAM: To find the difference between two dates */ #include<dos.h> #include<stdio.h> #include<conio.h> #include<process.h> void valid_date(int,int,int); int...
2
by: hph | last post by:
Please be gentle; I am a relative newbie for php/MySQL, and most of what I am doing is based on being self-taught using someone else's well-written code, and my own googling the answers to my...
3
by: MarcJoseph | last post by:
I have a database that is shared my multiple users who enter and update records on a weekly basis. Is there a way I can add a field to my main data table that will automatically generate the...
1
by: Russ Landry | last post by:
Hello, I have created a database, with many fields in the table. Most are static, but there are 48 fields that can be updated via, text, drop downs, check boxs, or direct data entry. I currently...
7
jayme
by: jayme | last post by:
is there a way to have my form automatically record when a record is changed? i figured how to make the date update JUST if you change a record, but i also wanted to have it record the user that was...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.