Changing the format for the Inserted Date and Time in OneNote

I saw this question posted last week on a previous post I had discussing the Date/Time format in OneNote.  I also got a few emails asking this same question from different users so I figured this may be interesting to write about.

"I am having trouble figuring out how to change the format of the time/date inserted. It defaults to 4/31/2009. [I]n my perfect world I would like Thursday, April 30, 2009."

Pasted from <>

There is a way to do this, and this will show one way that testing OneNote becomes a bit simpler.

First, let's see how Windows displays date formats. It varies from country to country and region to region. In Windows XP, you can open the control panel \ Regional and Language Options application to see how your system is configured. On Vista, depending on how your control panel is configured, it is under Clock, Language and Region settings, then "Change the date, time or number format."

Here's what it looks like in Vista:


And in XP:


If you click customize, the dialogs now start to match more and it looks like this:


See that Short date format circled? That is where Windows gets its information on how to display a compact date format. Your machine probably has this as the default:

M/d/yyyy if you live in the US.

The format here is not all that complicated and should be easy to understand. The M refers to month, the d for the day of the month, and yyyy is year.

Anyway, you can change the format here to this to get what Gunnar wants:

dddd, MMMM dd/yyyy

Clever readers will note that all Gunnar really wanted was the long date format used for the system short date format. All I did was copy/paste the format. This is pretty much true. You can also either play with and figure out the schema yourself, or look it up in excruciating detail online.

And very clever readers will note that I do not truly know if this is exactly what he wants. His "specification" is unclear since he only defines the desired result if the day of the month is 2 digits long:

Thursday, April 30, 2009

If the day is only one digit long, such as Friday, May 1, 2009, there are two ways that can be displayed:

Friday, May 1, 2009


Friday, May 01, 2009

Notice the "0" in front of the "1" in the day of the month. I had to guess which of these two formats Gunnar actually wants, and decided having 2 digits for consistency is preferred. I may have guessed wrong, but at least the workaround in this case is easy: remove the two "d" characters and use this string for short date format instead:

dddd, MMMM d/yyyy

Here's where testing gets easier, though. It is pretty obvious that we merely ask Windows what short date format to display when I type SHIFT+ALT+D. The advantage this gives me if I am the tester is that I know we have no specific OneNote code to change, alter, configure or otherwise adjust the date format. We simply rely on what the user has defined in Windows. If we did have our own code, we would need to ensure we were getting the date format correct for every language and region in the world, make sure we had it configurable for the users, test that code in addition to the code that actually inserts the string and maintain this code long term. We would wind up duplicating a lot of code and services Windows already gives us, and perform a lot of unneeded testing to maintain that code base. It's just easier to let the team over at Windows handle this and just give us a formatted string when we ask.

Questions, comments, concerns and criticisms always welcome,


Comments (10)

  1. Terry says:

    This solution works, in the sense that the format changes in OneNote…but it also affects all the other time fields in Windows, like Excel.

    I’m interested in the full, long format:

    "Wednesday, July 22, 2009, 15:55"

    After making this modification, the Excel date formats (Format>Cells> Date:Type) available get messed up.

    Also, this modfication means that Excel no longer recognizes the short form in Excel (and automatically converts the cell from a text type to a date type).

    Other changes that it makes is that the date value in the Windows Task Bar displays differently.

    All in all, this solution is bothersome enough that I’ve switched it back, and just put up with typing in the day when I insert a date.

  2. Gordon says:

    What a mess. Onenote puts the date in full format at the top of each page. Why can't I just choose in Onenote to use the long format for inserted dates?

  3. Darnell says:

    Yes this is ridiculous. why can't we just choose the long format.

  4. Angry Chris says:

    YES! Why CAN'T we?


    C'mon Microsoft, don't be so….soft, fix this for us!

  5. Angry Chris says:

    "The advantage this gives me if I am the tester is that I know we have no specific OneNote code to change, alter, configure or otherwise adjust the date format. We simply rely on what the user has defined in Windows."

    That's EXACTLY what OneNote POWER users WANT! The ability to change, alter or configure ONENOTE to do our bidding!

    NOT at the Windows level at the OneNote level!

    Computers are here to serve us, not make life more frustrating.

    Please add another option to the already complex Options option so we can:

    A. Select whether or not we want to use the definition for the ENTIRE Windows OS

    B. If not happy with option A, have the same configuration options in OneNote as we do in Windows.

    Shouldn't be too difficult to put in place.



  6. Angry Chris says:


    I've figured out a work around that isn't too onerous. Not that MS shouldn't consider adding this Date/Time functionality, along with Macro functionality, to OneNote 2010, but this will work and it's fairly easy to use, if a big kludgy.

    Basically I went into Word 2010, which DOES support Macros, and created a macro to insert the date & time in the correct format AND copy it to the clipboard AND minimize Word, which should put you back in OneNote if you went directly from OneNote to Word.

    Here is the macro:

    Sub Insert_Date_And_Time()


    ' Insert_Date_And_Time Macro



       Selection.InsertDateTime DateTimeFormat:="dddd, MMMM dd, yyyy", _

           InsertAsField:=False, DateLanguage:=wdEnglishUS, CalendarType:= _

           wdCalendarWestern, InsertAsFullWidth:=False


       Selection.InsertDateTime DateTimeFormat:="h:mm am/pm", InsertAsField:= _

           False, DateLanguage:=wdEnglishUS, CalendarType:=wdCalendarWestern, _


       Selection.HomeKey Unit:=wdLine

       Selection.MoveUp Unit:=wdLine, Count:=1

       Selection.MoveDown Unit:=wdLine, Count:=2, Extend:=wdExtend


       Selection.MoveRight Unit:=wdCharacter, Count:=1


       Application.WindowState = wdWindowStateMinimize

    End Sub

    I assigned a shortcut to my macro, so all I have to do is Alt-Tab from OneNote to Word, hit my shortcut (Alt-Shift-F) and the macro runs and puts me back in OneNote, where I simply press Ctrl-V to paste the Date & Time.

    A little awkward, but it gets the format I want with just a few keystrokes instead of trying to type it manually.

    Also note there are different Date & Time formats available in Word, so if you don't want the format being discussed in this thread, you can probably find the one you want with a little experimenting.


    Angry Chris

    (Sign Me- Mollified Chris)

  7. KoolPal says:

    The issue is that changing the short date format messes up Excel calculations!

  8. Non-techie Talk says:

    Typical "scratch your head and wonder why" a la Microsoft. Oy.

  9. Stampyt says:

    If you install the free Onetastic add-on for OneNote, you will be able to download a macro that will insert the long date.  Onetastic has additional features such as OneCalendar which gives you a visual calendar of when notes were taken – it is definitely worth a look.



Skip to main content