skip to Main Content

PostgreSQL interval returned in days

I have this basic PostgreSQL query: SELECT AGE('2021-01-21', '1942-11-20'); Which returns an interval in days: output: 28531 days, 0:00:00 I am using PostgreSQL version 14, according to the docs, AGE() should return a symbolic result in years, months and days…

VIEW QUESTION

Number format equivalent function in PostgreSQL

Trying to format the number as per the given format and culture. Given: -4059587.225000, --Value '#,##0.00;(#,##0.00)' --Format 'en-US' --Culture Will have many patterns, the given one is for example. Expected output: (4,059,587.23) In SQL Server we have format() function, what's…

VIEW QUESTION
Back To Top
Search