Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way I can create a hotkey to format a field from text to datetime? I can use Ctrl+Shift+# (21-Oct-13) to format to Date and Ctrl+Shift+@ (4:19 PM) to format as time. I'd like to see the date and the time. I know I can go into Format Cells... but I'd like a quicker way of doing this.

Is there an easy way to do this or to create a macro to accomplish this?

Excel 2010

share|improve this question
up vote 1 down vote accepted

I just recorded the following macro in Excel 2007 but should translate to 2010:

Sub Macro1()
' Macro1 Macro

    Selection.NumberFormat = "[$-409]m/d/yy h:mm AM/PM;@"
End Sub
share|improve this answer
I'd have to load that Macro for each excel document? – Gabe Mar 16 '14 at 1:39
You could, yes. There is another alternative I have not personally used before, but seems to be a reasonable way to go -… – bmshort Mar 16 '14 at 1:44
That'll work perfectly! Thank you! – Gabe Mar 16 '14 at 4:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.