Jump to content

Help with snippet dates!

Recommended Posts

Hello all, first time poster here with what I suspect is a dumb question, but it's mystifying me. 


I want to have a snippet that expands to the current date in yy-mm-dd format. I have a snippet set up to that effect with the following snippet formula: {date:yy-mm-dd}


The problem is that it the expansion is making strange random mistakes! For example, I opened a word doc, and it expanded to the date 24-03-12. Then I opened an Outlook email, and it expanded to 24-06-12! 


This is so strange! I checked and my system date and time on my mac computer are correct. Can anyone give me an idea why this is happening? Thanks much!

Link to comment

Welcome to the forum.


I think we need to check whether the MS apps are themselves doing strange things with date strings (for example, applying their own substitutions). Just to check, open TextEdit and expand the snippet there. Does that work properly?





Link to comment

@thelitigator A minor adjustment to @Stephen_C's suggestion will be to make the year element of the date lowercase yy instead of uppercase, as the lower case is what we think of as the year, whereas the YY alternative refers to the "week of year", meaning you may get strange results in the first week of the year.


As such, your placeholder would use yy-MM-dd for year, month and date in the format you had in mind :)



Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...