--- title: "format date/timestamp to text()" slug: "date-convert-to-string" updated: 2026-11-02T15:45:57Z published: 2026-11-02T15:45:57Z canonical: "docs.lobstersoftware.com/date-convert-to-string" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # format date/timestamp to text() This function creates a formatted text of a date/timestamp **a** using date template **b**. Optional parameter **c** can contain a locale. In addition, a time zone can be specified the date should be changed to before doing the formatting. If no timezone is specified, the date's timezone is used. ## Parameters | Parameter | Description | | --- | --- | | a | Date/Timestamp. See also parameter **e**. | | b | [Format templates for dates and times](/v1/docs/en/intro-concepts-format-templates). | | c | (optional) Locale. **Default**: System Locale. **NOTE:** Use the three dots to select a value. | | d | (optional) The time zone the date should be changed to before formatting. **Default**: The date's time zone. **IMPORTANT:** The abbreviated forms should be avoided because some of them have been used for different time zones, making it impossible to ensure the usage of the correct one. Java only supports these forms for backwards compatibility reasons. After an update of the Java Virtual Machine or the operating system, it is possible that a Profile returns a different result. Allowed abbreviations: *GMT*, *UTC*, *SYSTEM* (local time zone of server). **Examples:** *America/New_York* *Europe/Berlin* | | e | (optional) Error handling if **a** is not a valid Date/Timestamp value or a Date/Timestamp with an empty flag (see 'hidden values' there). **Default**: - *empty –* The result of the function is an empty string with a set empty flag. - *error –* Termination with error message. - *now –* The current time as the timestamp is used for **a**. - – The current time as the timestamp is used for **a**. - – The text in **e** will be the return value of the function. | ## Examples | Parameter a | b | c | d | e | Result | | --- | --- | --- | --- | --- | --- | | 2005-01-05 | yyyy/MM/dd HH:mm:ss | | | | 2005/01/05 00:00:00 | | 2007-12-31 | ww/yyyy | | | | 01/2007 | | 2007-12-31 | ww/YYYY | | | | 01/2008 (in first calendar week 2008) | | 2012-12-10 | dd-MMM-yyyy, EEEE | de_DE | | | 10-Dez-2012, Montag | | 2012-12-10 | dd-MMM-yyyy, EEEE | en_US | | | 10-Dec-2012, Monday | | 2012-12-10 | dd-MMM-yyyy, EEEE | fr_FR | | | 10-déc.-2012, lundi | | 2012-12-10 | dd-MMM-yyyy, EEEE | ru | | | 10-дек-2012, понедельник | | 2012-12-10 23:25:12 | EEEE, dd.MMM.yyyy hh:mm:ss a | de_DE | | | Montag, 10.Dez.2012 11:25:12 PM | | 2012-12-10 23:25:12 | E, dd MMMM yyyy HH:mm:ss | fr_FR | | | lun., 10 décembre 2012 23:25:12 | | 2012-12-10 23:25:12 | W3C | | Europe/Berlin | | 2012-12-10T23:25:12+01:00 | | 2012-12-10 23:25:12 | w3cdtf | | GMT | | 2012-12-10T22:25:12Z | | abc | yyyy/MM/dd HH:mm:ss | | | empty | (empty string with a set empty flag) | | abc | yyyy/MM/dd HH:mm:ss | | | error | Termination with error message | A profile is the central configuration unit in the Lobster Data Platform. It receives data, processes it, and forwards it. Configuration is done graphically, with no programming required. ## Related - [Format templates for dates and times](/intro-concepts-format-templates.md)