473,396 Members | 2,030 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,396 software developers and data experts.

How to set the system date format in Access

33
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 8202
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 Expert Mod 8TB
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,556 Expert Mod 16PB
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 Expert 2GB
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,556 Expert Mod 16PB
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
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...
5
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...
3
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 : ...
1
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...
7
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, ...
16
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...
8
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....
10
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...
2
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...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...

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.