Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2019, 03:23 AM
jammyemma jammyemma is offline Macro for changing date format from US to European Windows 10 Macro for changing date format from US to European Office 2013
Novice
Macro for changing date format from US to European
 
Join Date: Sep 2019
Posts: 2
jammyemma is on a distinguished road
Default Macro for changing date format from US to European

Hello, I'm hoping you can help me. I'm working on an enormous document which is full of dates formatted in the US style, as in 'July 12, 2016'. I want to change all of these to the UK style '12 July 2016'.


I've been using a find and replace I found on another forum (find (January) ([0-9]{1,2}),, and replace with \2 \1 but it gives a spacing error which I then have to correct. I also have to do each month separately which is a bit of a faff. So I was wondering if anyone knew of a macro which could do this for me?
All help gratefully received!
Thank you.

Last edited by Charles Kenyon; 09-23-2019 at 09:13 AM. Reason: Mark as solved
Reply With Quote
  #2  
Old 09-18-2019, 03:59 PM
macropod's Avatar
macropod macropod is offline Macro for changing date format from US to European Windows 7 64bit Macro for changing date format from US to European Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You don't need a macro for this - it can be done via a single wildcard Find/Replace, where:
Find = (<[JFMASOND][abceghilmnoprstuvy]{2,8} )([0-9]{1,2}), ([12][0-9]{3}>)
Replace = \2 \1\3
You could, of course, turn the above into a wildcard Find/Replace macro.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-23-2019, 03:37 AM
jammyemma jammyemma is offline Macro for changing date format from US to European Windows 10 Macro for changing date format from US to European Office 2013
Novice
Macro for changing date format from US to European
 
Join Date: Sep 2019
Posts: 2
jammyemma is on a distinguished road
Default

Brilliant, thanks so much. That works perfectly and is going to make my working life so much easier. Thanks again!
Reply With Quote
Reply

Tags
dates in word



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing date Format Borut2019 Excel 1 02-18-2019 01:46 AM
Macro for changing date format from US to European Changing Date/time to Australia format tmeck63 Project 1 01-07-2016 09:11 PM
Macro for changing date format from US to European Help needed in changing date format Rose roon Excel 5 07-27-2015 11:57 PM
Macro for changing date format from US to European Document opening with unreadable characters - converter says W. European Ed354 Word 1 07-03-2014 12:29 AM
Macro for changing date format from US to European changing date format in Bibliography field elly111sk Word 3 07-25-2012 06:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft