What is Formatter?
Formatter is a built-in app by Automate.io. You can use it to convert data into a different format before adding it to another app in your Bot.
Where can I find Formatter on Automate.io?
You can find Formatter while you are creating a Bot. To use Formatter, first, add a Trigger app to your Bot. Then, select Formatter from the Apps list.
How do I convert date & time using Formatter?
Different countries have different ways of listing dates & times. The same is the case with the apps we use every day—each one of them has their own way of showing date & time. If Stripe says that a payment has been made at 17:30:25 Aug 26, 2019, your Shopify store could say that the same order was made on Monday, 26 August 2019 at 5:30 PM.
Also, with many time zones across the world, it can get confusing to work with all of that data.
Format Date removes those hurdles and allows you to customize date & time into the format you want automatically. It can also convert the input time into a different time zone.
Let's learn how Format Date works. Say you have a date & time field coming from Google Sheets, and you want to convert that into a specific format.
- Under Input Date/Time, put the field that you want to convert.
- You can optionally specify the format of the above date & time field. If you are unsure about it (or if the format option is missing in the drop-down), you can leave it as Auto Detect. The system understands a wide variety of formats, even human-readable formats like 'next monday 5pm'.
- Under Target Format, from the drop-down, select the format you wish to convert it to. In most cases, what you may want is to convert it into Automate.io's standard format (which is provided in the drop-down) so that it can be used as an input in a subsequent action. However, if you are looking for some other format not provided in the drop-down, you can choose the Use Custom Value option and provide your desired format. You can look up for the formatting options here. Look for the desired tokens for a year, month, day & time.
- Select the target time zone you want the date & time to be.
- The Formatted Date/Time is the field that stores the converted date & time. Once you've set up this step, you can continue setting up the rest of your Bot by adding more actions. Be sure to use this output further in your Bot.
Note: To use the converted date/time in your Bot, use the Formatted Date/Time field from Formatter's Output Fields.
Important: Remember that the Formatter should be added in your Bot immediately after the app whose data you want to convert. In other words, if you want to convert the data coming from a Google spreadsheet, you have to add the Formatter right after that. Refer to the image below.
For more on Formatter, click here.