A couple of Date Questions

Hello all,

Using PostgreSQL, what is the best column type to use to store dates? I have been using Text and CharacterVarying(10) to store dates as SQL.DateTime.

But, is that really the best way to do this? This question I do not know.

This is how I get the data out - following a SELECT command.

Lic_StartDate  = RsSiteLicense.Field("start_date").StringValue
Lic_ExpDate  = RsSiteLicense.Field("exp_date").StringValue
Lic_LastRenewal = RsSiteLicense.Field("last_renewal").StringValue

But if the those string fields were changed in Postgre, how would that work with the existing code?

Thoughts and Ideas are appreciated!

Thanks,
Tim

DateColumn and DateValue on xojo side API1
databasecolumn.datetimevalue on xojo api2
date or timestamp on postgres side

https://documentation.xojo.com/api/databases/databasecolumn.html

Thank you Jean-Yves Pochez.

Tim