--- title: "datetime() submacro" slug: "datetime-submacro" updated: 2023-01-06T15:49:51Z published: 2023-01-06T15:49:51Z canonical: "docs.catchpoint.com/datetime-submacro" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.catchpoint.com/llms.txt > Use this file to discover all available pages before exploring further. # datetime() submacro Alert webhook macros like **alertProcessingTimestampUTC** and **alertCreateDateLocal** returns the date and time in a concatenated format like `20170412105408131`. This may not not be easy/friendly to read. In order to format the date and time in a more readable way, we can make use of `datetime()` sub-macro. For example: ``` { "alertProcessingTimestampUTC": "${alertProcessingTimestampUTC}", "alertCreateDateLocal": "${alertCreateDateLocal}", } ``` This JSON template without the datetime macro gives the output as shown below. ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360010982592-mceclip1.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A21%3A29Z&se=2026-11-23T01%3A21%3A29Z&sr=b&sp=r&sig=Ij1LGmcgzc3hMXkNza44fP6yENuYnM8TI2Xjmoyj71E%3D) Now, if we use the datetime macro like the example given below, we get the date and time in a more readable format. ``` { "alertProcessingTimestampUTC": "${alertProcessingTimestampUTC(datetime(yyyy-MM-ddHH:mm:ss))}", "AlertCreateDateLocal": "${AlertCreateDateLocal(datetime(yyyy-MM-dd HH:mm:ss))}" } ``` ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360011798792-mceclip0.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A21%3A29Z&se=2026-11-23T01%3A21%3A29Z&sr=b&sp=r&sig=%2Fnx3U3196SHuE852xyjOfRR%2FBp6%2B3JFJSJe4Eg7MZoE%3D)