--- title: "toTime()" slug: "edi-to-timestamp" updated: 2025-09-17T19:52:11Z published: 2025-09-22T09:16:27Z canonical: "docs.lobstersoftware.com/edi-to-timestamp" --- > ## 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. # toTime() **This function is deprecated.** Returns the date created from an EDIFACT DTM segment using the format code **a** and the encoded date value **b**. If a format code is used that is not allowed or a coded date value that does not match the format code, the function terminates with an error (see examples). ## Parameters | Parameter | Description | | --- | --- | | a | Format code. Allowed codes: *5, 10, 201-205, 301-304, 401-402, 404-405.* **Note:** For the codes, see e.g. https://www.edifactory.de/edifact/directory/D96A/data-element/2379 or similar sites. | | b | Encoded date value. | | c | Time zone. | ## Examples The current year in the example is *2011.* | Parameter a | Parameter b | Parameter c | Result | | --- | --- | --- | --- | | 305 | 12240802 | | Termination with an error (invalid code). | | 201 | 9911121200 | | 1999-11-12 12:00:00.0 |