Forum > Database

Max() function on datetime column in SQLite

<< < (3/3)

Zvoni:

--- Quote from: tt on April 22, 2022, 03:04:07 pm ---
*snip* even if this will make the program not database independent (postgres does not have a julianday() function. I see no other solution now.

--- End quote ---
What's that got to do with Database-independence?
You would only need such a function in PostGres (or any other DBMS), if you MIX the Format of your entries.
And PostGres definitely won't allow you to stuff a String into a Real-Column.
Setup the DataType correctly in SQLite (as described in the documentation), and do any conversion from your Frontend-Code.
Important: Stay consistent. Don't mix ISO-Format with Unixepoch and Julian-Format

Navigation

[0] Message Index

[*] Previous page

Go to full version