473,624 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date format in update query

Hi

How can I ensure that date is always assigned in dd/mm/yyyy format to a date
filed, in an update query?

Thanks

Regards
Jun 23 '06 #1
3 8786
Access does not store dates in a specific format. The format is applied at
display time, and depends on the user's Regional Settings (in the Windows
Control Panel.)

So perhaps your question is, "How can I ensure that Access understands the
dates in the query, and stores the correctly when the Update query
executes?"

I also live in a d/m/y country, and in 15 years of working with Access have
found 3 cases where Access is likely to misunderstand our dates. Details in:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

If the dates are calculated ones, typecasting them in the query can also
help:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:yt******** *************** *******@pipex.n et...

How can I ensure that date is always assigned in dd/mm/yyyy format to a
date filed, in an update query?

Jun 23 '06 #2
* John:
Hi

How can I ensure that date is always assigned in dd/mm/yyyy format to a date
filed, in an update query?

Thanks

Regards


If you are updating a date field, there is no reason to consider the
format. Dates are always stored as a numeric value. It's only when you
display the dates that the format is applied.

--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
Jun 23 '06 #3
in the query string use format(mydate," mm/dd/yyyy")
that will ensure that the query understands your date.
Alec

"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:yt******** *************** *******@pipex.n et...
Hi

How can I ensure that date is always assigned in dd/mm/yyyy format to a date filed, in an update query?

Thanks

Regards

Jun 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2059
by: Mike Dundee | last post by:
I am importing data into a new database (the database still has to be set up) and have a problem. The comma delimited text files I am importing have four fields containing date and date/times. One field in particular has a date format of MMM dd yyyy hh:mmAM eg Feb 20 2004 10:00AM. The other fields import correctly (although I haven't run a query against them) they have two other formats: dd/mm/yy hh:mm:ss and "plain old" dd-mm-yy. The...
5
2930
by: m_t_hill | last post by:
Running MS Access 2000 MS Windows XP Pro This has caused me a lot of hair loss in the last few days so would appreciate any help. I am running code to append/update a local access database from a remote MS SQL database. The method of determining which records to append is primarily using the last date an update was carried out; I appreciate that there is probably a better way of doing this but time
1
2081
by: Paul | last post by:
Is there a way in Access to convert a date in format "mdy - 08/05/2005" to "ymd - 2005-08-05" using an update query?
1
1331
by: Bogdan Zamfir | last post by:
Hi, I use an Access BE, and I need to use an update SQL query to update a datetime field In my locale date format is dd/mm/yy, but in Access SQL date must bhe formatted as mm/dd/yy in order to be able to update database, as follows Update Project set EndDate = "01/31/03" where ProjectID = 100 So I have to convert my date 31 january 2003 to US format (mm/dd/yy)
7
4226
by: Jerome | last post by:
Hallo, I know a lot has already been told about date/time fields in a database but still confuses me, specif when dealing with SQLserver(Express). It seems that sqlserver only accepts the date in a "yyyyMMdd" format? (difference between Express and MSDE2000A ?) What is the one and only true way to deal with this problem in VB2005: Local settings are Dutch (Belgium) ; thus date is in "dd/MM/yy" (or perhaps dd/MM/yyyy) and time in...
2
6997
by: savigliano | last post by:
hello, i am doing a date comparation and i have reallize that the data i have in my database (general date format) it is causing me problems, and because i don´t need the time data i would like to convert all the general date data into short date format, so i would like to delete the time part of the data, it is any way i can do that ???? Thank you in advance and sorry for my english carlos
8
2896
by: saladinator | last post by:
I have created an Excel spreadsheet that has a lot of data. What I want to do is import the spreedsheet to Access and create a form so that I can print each row per page in a proffessional manner. The problem is that whenever I import the data to access my dates show up in 38478 instead of 05/06/05. How can I convert this number back to the date format in access?
30
5689
by: fniles | last post by:
On my machine in the office I change the computer setting to English (UK) so the date format is dd/mm/yyyy instead of mm/dd/yyyy for US. This problem happens in either Access or SQL Server. In the database I have a table with Date/time column. The database is located on a machine that is set to dd/mm/yyyy also. When I enter date 7/1/08 (as in January 7, 2008), it stores it in the database as 1/7/08 instead of 7/1/08. Why is it like that...
2
3417
by: CORTHOM | last post by:
If any one that can help me I have this simple database that I need to gather information and sort depending on carrier. A field in one of the tables is set up for general date format and I need to create a query to update the field to short date. I figured this is the only way since the information is being imported from excel in general date format. If any one can help that would be greatly appreciated Im a beginner and this seems to...
0
8246
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8341
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.