Date Formats

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,304
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
At the moment I have the UK format of the date in Regional Options in the Control Panel i.e. dd/mm/yyyy.

However if I place Date$() in a query, I obtain the US format i.e. mm/dd/yyyy? Why do I not obtain the UK format, in this case?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Happens in Excel too... I'm pretty sure that many of the built-in date functions (and I've seen it in non-MS apps too) output dates and date strings in US format. The International versions of the apps still have the US functions...

Denis
 
Upvote 0
Is their a setting somewhere that we can change to automatically revert to the CP setting? I know that I can resolve the issue using the Format function, however I'm concentrating on how to change a global setting if possible.
 
Upvote 0
I think that if you use Date() rather than Date$() it will use the local settings

Peter
 
Upvote 0
For reasons to long to explain, I want to use Date$(). Why does the Date$() not follow the CP setting when Date() does?
 
Upvote 0
Copying and pasting doesn't take too long as I imagine u will know yourself.

I'm quite capable of checking my post on other forums without your prompts. Mny thanks.
 
Upvote 0

Forum statistics

Threads
1,221,566
Messages
6,160,525
Members
451,655
Latest member
rugubara

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top