I need to update a date field (the date, not the hour) in postgreSQL to another year.
In Access it's so simple as :
UPDATE historiales SET historiales.hora = CDate(Format([fecha], "dd/mm/yyyy" + " " + Format([hora], "hh:mm:ss") WHERE (((Year([hora])) = 1899));
Where [fecha] and [hora] are 'timestamptz' type. In the field [hora] I must keep the same hour, but changing the date with the value contained in the field [fecha].
How could I do this in postgreSQL?
Thank you very much!
In Access it's so simple as :
UPDATE historiales SET historiales.hora = CDate(Format([fecha], "dd/mm/yyyy" + " " + Format([hora], "hh:mm:ss") WHERE (((Year([hora])) = 1899));
Where [fecha] and [hora] are 'timestamptz' type. In the field [hora] I must keep the same hour, but changing the date with the value contained in the field [fecha].
How could I do this in postgreSQL?
Thank you very much!