Modifying Dates & Times#

There are times when you'll want to manipulate dates and times in your Zap, and we provide a couple different means for you to do so.

Time Stamps#

If you want to include the time your Zap runs in your Zap (or use that as an approximation of when the trigger occurs), you can use the following field in your Zap:

{{zap_meta_human_now}}

When used in a date-formatted field and certain text fields, that placeholder will return a date/time stamp from the time zone set in your Zapier profile settings. If you have no time zone picked, it defaults to UTC. This will print a human-readable string in MM/DD/YY hh:mmA format (for example, 07/15/16 06:05PM).

If you need a machine readable string, such as for sending to a Google Calendar create event action, you should use:

{{zap_meta_utc_iso}}

This command is similar to the first, but it will print the date/time in a format that other machines (and APIs) can read. This command won't consider the time zone set in your profile settings, and will output an ISO-8601 time stamp in UTC time (for example, 2016-07-15T18:07:48+00:00).

NOTE: When you use this time stamp, it will not show up in the sample data nor when you check the testing step in your Zap. It's only after your Zap actually takes an action in the background that the time stamp will be replaced, as shown in the video below.

Time Stamp Example Gif

Adjusting Dates and Times#

Other times you may have a date or time that you want to adjust for your purposes. For example, your trigger service gives you a meeting start time, but you want to be able to include an end time 3 hours afterwards. To do this, you'll use the following syntax right after the date/time field you want to adjust.

IMPORTANT: You need a space between the placeholder and the adjustment, or it will not work.
Datetime modifier with space Datetime modifier without space

Reformatting Dates and Times#

If you need to reformat a date, perhaps to change an American date format to International format, want to remove the time or date from a value, or want to add or subtract dates with more options, add a Formatter action to your Zap. It can reformat the date or time to the format you want before adding it to your action app.

For more info on Formatter, see:

Recurring Actions#

To schedule recurring actions, you may want to try using a Schedule trigger or a Google Calendar "Event Start" trigger. For more info on that, see:

Modifier Options#

  • +7h - 7 hours after the date/time in the field.
  • +10d - 10 days after the date/time in the field.
  • -45m - 45 minutes before the date/time in the field.
  • +30s - 30 seconds after the date/time in the field. Useful if you receive a duration in seconds.

You can mix and match those as well. Remember you need to put a space between these!

  • +5h +30m - 5 hours and 30 minutes after the date/time in the field
  • -2d -12h - 2 days and 12 hours before the date/time in the field.

Human Readable Dates/Times#

We also are able to parse a range of "human readable" transformations like "tomorrow", "today", or "three weeks from now". See this list for more ideas about what is possible.

A few things to be mindful of when using modifiers:

  • They only work if you are inserting the time into a date/time field. Date/time fields have icons next to the name.
  • They will not be reflected in the UI inside the Zap editor -- they are performed before writing any Task to the Action of a Zap.
  • You cannot use decimals like 0.5h. Write it as 30m instead.

Example#

In the interface for a Zap that copies a Google Calendar Event from one calendar to another, you might have a field that looks like:

Detailed event time fixing.

↑ Was this documentation useful? Yes No (Suggest Edits)
Get Help