How to change US date format to UK date format - dd/mm/yyyy

vbanewbie68

Board Regular
Joined
Oct 16, 2021
Messages
171
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi

Please could you show me how to change from US date to United Kingdom Date like this dd/mm/yyyy?

Thank you in advance

Best regards

V


1638286606774.png


Sub Add_Rows_Data()
LastRow = Imprt.Cells(1, 1).End(xlDown).Row
DatePaymentMade = WorksheetFunction.Match("DatePaymentMade", Imprt.Cells(1, 1).EntireRow, 0)
For x = 2 To LastRow

Imprt.Cells(x, DatePaymentMade).Value = DateValue(Cells(x, DatePaymentMade).Text) 'Date format

Next x

End Sub
 
VBA Code:
Sub FixDate6()
' USA text DateTime retain just Date Value
' Custom format the date dd-mmm-yyyy

  With Selection
    .TextToColumns DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=1, Tab:=0, _
        Semicolon:=0, Comma:=0, Space:=1, Other:=0, FieldInfo:=Array(Array(1, 3), Array(2, 9), Array(3, 9)), TrailingMinusNumbers:=1
     .NumberFormat = "dd-mmm-yyyy"
  End With
End Sub
 
Upvote 0
Solution

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
"Thanks for this and got the date correct but can't rid of the time stamp."

Time does not show on your post.
Do you require an edit to the code to ignore the time?

Hello!
I saw an alert message from you and when I login this and there is no message from you. Did you send a reply?

Warm regards

V
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,111
Members
449,205
Latest member
ralemanygarcia

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