Jump to content

{date} and {time} format in Snippets


Recommended Posts

The list andy mentions above is for V2. Is there a V3 documentation somewhere? I have noticed that I can use more robust date features with V3. For instance I can now use {date:YMMddHHmmssss} to create a unique date stamp and I can use {date:YYYYMMdd} to create sortable dates for files.

 

Are there other new place holders or placeholder options other than what is listed on the above page?

Edited by BigHandsome
Link to comment

The list andy mentions above is for V2. Is there a V3 documentation somewhere? I have noticed that I can use more robust date features with V3. For instance I can now use {date:YMMddHHmmssss} to create a unique date stamp and I can use {date:YYYYMMdd} to create sortable dates for files.

 

Are there other new place holders or placeholder options other than what is listed on the above page?

 

 

Hi guys,

 

This is already possible in Alfred 3, but as it's still in beta, the documentation isn't live yet.

 
You can just use {date:FORMAT} e.g. for ISO 8601: {date:yyyy-MM-dd'T'HH:mm:ssZZZZZ}
 
Take a look at http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patternsuntil our own documentation is live to be more specific with your date formatting.
 
Cheers,
Vero
Link to comment

Awesome! This is great.

 

Is there a way to do math with the dates. The last thing I need to port from TextExpander is a date formula that allows me to insert the date for 14 days from now. the snippet looks like this in TextExpander %@+14D%B %e, %Y. I was wondering if there was a similar in the new snippets features?

Link to comment
  • 3 years later...
On 5/18/2016 at 8:48 PM, BigHandsome said:

Awesome! This is great.

 

Is there a way to do math with the dates. The last thing I need to port from TextExpander is a date formula that allows me to insert the date for 14 days from now. the snippet looks like this in TextExpander %@+14D%B %e, %Y. I was wondering if there was a similar in the new snippets features?

You can use like below.

 

{date +14D:yyyy-MM-dd}

 

see more: https://www.alfredapp.com/help/workflows/advanced/placeholders/

Link to comment
  • 1 year later...

@todoublez There's no need to search the snippets to paste the date. If you set up your snippets for text auto-expansion, you can just type your snippet shortcut in your document (without showing Alfred's Snippets Viewer) and Alfred will replace the keyword with your dynamic date.

 

Here's how you can set up text expansion:

https://www.alfredapp.com/help/features/snippets/auto-expansion/

 

You would then create a snippet containing {date} or a variation of it for the specific date format you want:

https://www.alfredapp.com/help/workflows/advanced/placeholders/#date-time

 

If you specifically want to pop up Alfred to paste the date, you can create a workflow to do this. Connect a Keyword object to a Copy to Clipboard. Put your {date} into the clipboard object and tick the box to "Paste to frontmost app".

 

Let me know if you need any further help :)

 

Cheers,
Vero

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...