473,809 Members | 2,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to set the system date format in Access

33 New Member
Hello,

I have an Access program with 4 forms. In the load event of the main form, I need to set the system date format to British. Can anyone please give the code for setting the system date format ?

Thanks in advance

Matsam
Nov 13 '09 #1
5 8254
grahamib
4 New Member
Hi
Maybe too simple but have you tried
"=Now()"
in the fields where you want the system date. As long as the p.c. you are on has the correct regional date this will return that date.

Cheers

Grahamib
Nov 13 '09 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
Access does have some problems where it reverts to the American Date format. Unfortunately, you can't overwrite this in one go. Wherever you need the date it is always best policy to enforce the British format. The following function will format the system date.

Expand|Select|Wrap|Line Numbers
  1. Format(Now(), "dd/mm/yyyy") 
  2.  
For more information you can check out an article on using Dates in Access in our Insight forum.

Literal DateTimes and Their Delimiters (#)

Mary
Nov 13 '09 #3
NeoPa
32,579 Recognized Expert Moderator MVP
Your question illustrates a certain lack of understanding on your part (I assume).

If I explain that the System Date format is a System level entity then maybe you will understand that it's not something generally amended from within a single application (It may be possible, but except for extreme circumstances it should never be done. It is essentially out of scope).

Can you explain more clearly what you need it for and we can give some consideration to what may be most appropriate in you situation. Mary's suggestion may well be the solution, but a clearer understanding of your problem would be necessary to know.

Generally, formatting of values should only ever be done as the last step in a process. While a formatted string may look similar to a value to the human observer, it is not treated as very similar within the code.
Nov 15 '09 #4
missinglinq
3,532 Recognized Expert Specialist
I took the question literally, as NeoPa apparently did, where as the OP wants to actually change the format used by Windows in displaying the date at the System level, and as he said, you simply do not do this from any app!

Users expect System settings to either be the default settings or those they chose themselves. While a developer may have a reason for wanting the date format to be British, as he/she does here, the end user may be multi-tasking, running other programs that use dates, and may not be very understanding when they date format changes on all programs

As Mary mentioned, in passing, Access not only prefers but at times insists that dates be in the American format in order for things to work correctly. Allen Browne has an excellent short paper on using international date formats in Access that is probably worth a read by anyone dealing with this issue:

http://www.allenbrowne.com/ser-36.html

Linq ;0)>
Nov 15 '09 #5
NeoPa
32,579 Recognized Expert Moderator MVP
Indeed. As you say Linq, the SQL date format is the same as the American format, so using the American format will work the world over.
Nov 16 '09 #6

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

Similar topics

3
11585
by: Lyn | last post by:
Hi, I am developing a project in which I am checking for records with overlapping start/end dates. Record dates must not overlap date of birth, date of death, be in the future, and must not overlap existing records from the same table. I had this all working some time ago, but recently when I have gone back to do more testing, part of these validations no longer work. While there have been changes to the code in the meantime, I cannot...
5
2940
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
3
5009
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function HelloWorld() As > <System.Xml.Serialization.SoapElementAttribute("return")> String
1
2066
by: scott | last post by:
Hi Everyone, I don't know if this is the correct forum but I thought i'd ask. I have an access DB with a function to automatically safe a table with fields i'm mail merging into MS Word. Word looks at the table from the Access Database. The export function all works, but the Date format is incorrect. I want it in Long format (Tuesday, 2, May, 2006) which is how it's stored in the table. When I open Word with the merged document, the...
7
2776
by: mr.nimz | last post by:
hello, this is antenio. recently i've come to a problem. i got a way through it, somehow, still it left me in a curious state, so i'm posting it here, if i can get an answer from some techy, here is my table structure, Name: Table1
16
11919
by: Mik | last post by:
I apologise if this post seems a little basic, but I am a newbie and have NO access knowledge. I have downloaded the Accounts Ledger from the Microsoft Website. It allows the user to review a report of transactions between a Start & End date. The Tables and forms i believe are UK format "dd/mm/yyyy", However, when I click on "Review Reports" and enter the date as UK "dd/mm/yyyy", it returns nothing.
8
2907
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?
10
5827
by: ARC | last post by:
Hello all, General question for back-end database that has numerous date fields where the database will be used in regions that put the month first, and regions that do not. Should I save a date format in the table design, such as: mm/dd/yyyy? What I've done for years is to store the date format in date fields, then on the forms, based on their region, I would set the date formats on form_load
2
2366
by: Stevienashaa | last post by:
Hello I'm using Access 2003, and I have a query (written in SQL) which has two parameters and asks the user for two dates. This has been working fine. Today I modified the query, removing the paramerters and hard- coding some dates in, in dd/mm/yy format. To my surprise I got a different number of records returned. I then, as an experiment, change the date format to dd/mm/yyyy. This again returned a different number of records,...
0
9600
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,...
0
10633
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10375
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
9198
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
7651
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
5548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.