title: Formatting time from dd/mm/yyyy hh:mm:ss to yyyy.mm.dd hh:mm
body: <p>I received the following task:
  turn "dd/mm/yyyy hh:mm:ss" time to "yyyy.mm.dd hh:mm" format.</p>
  
  <p>I was hoping that a simple Format(activecell.value, "yyyy.mm.dd hh:mm") would help, but.
  In some cases it works. However, in some special cases, it doesn't.
  When the day is between 01-12 (interchangeable with months!), then it messes up the days with months. (Probably because of US style date format.)</p>
  
  <p>For example, original text string:
  04/06/2013 09:00:00</p>
  
  <p>Expected:
  2013.06.04 09:00</p>
  
  <p>Result:
  2013.04.06 09:00 (day and month have been swapped)</p>
  
  <p>I tried to overcome it by formatting the input, I gave it a "dd/mm/yyyy hh:mm:ss" custom format. Didn't help, it still swaps the day and the month.</p>
  
  <p>So I have no ideas anymore, but regular expressions. Date format is always the same so just moving the parts of the string would be okay.
  However, I don't know how that works and google searching brings up confusing results.</p>
  
  <p>Can anyone help me?
  Of course if there is a more elegant way to do it, that's also welcome.</p>