Αποτελέσματα Αναζήτησης
9 Αυγ 2016 · This is a terse way to "turn a PostgreSQL date representation into an ISO 8601 string": SELECT to_json(now())#>>'{}'. It uses the #>> operator in combination with the to_json() function, which can both be found on this page: https://www.postgresql.org/docs/current/functions-json.html.
26 Σεπ 2024 · The PostgreSQL formatting functions provide a powerful set of tools for converting various data types (date/time, integer, floating point, numeric) to formatted strings and for converting from formatted strings to specific data types. Table 9.26 lists them.
26 Σεπ 2024 · Date and time input is accepted in almost any reasonable format, including ISO 8601, SQL-compatible, traditional POSTGRES, and others. For some formats, ordering of day, month, and year in date input is ambiguous and there is support for specifying the expected ordering of these fields.
12 Ιαν 2024 · PostgreSQL is smart, and can figure out a date from a string if you provide the date in ISO 6801 format. How to Format Dates in PostgreSQL: Using the TO_CHAR function. The primary method to format dates in PostgreSQL is using the TO_CHAR function. TO_CHAR allows us to format date/time types into a string of a specific pattern. Here’s format ...
16 Ιουλ 2020 · Types. Use only the following 3 types (although many are available): date - a specific date, without time. timestamptz - a specific date and time with microsecond resolution. interval - a time interval with microsecond resolution. These three types together should support most application use cases.
25 Μαΐ 2011 · You could set the date style to European dd/mm/yyyy: SET DateStyle TO European; I'd advise against this though. I generally try to convert between formats, and keep ISO formatted dates in the data source.
26 Σεπ 2024 · Date/Time Functions. In addition to these functions, the SQL OVERLAPS operator is supported: (start1, end1) OVERLAPS (start2, end2) (start1, length1) OVERLAPS (start2, length2) This expression yields true when two time periods (defined by their endpoints) overlap, false when they do not overlap.