2
I am using a select command where I take the month and year of the date as follows:
extract(year from D.dt_ficha) + extract(month from D.dt_ficha)
Only instead of showing up like this: 201711
November 2017, it is adding 2017 + 11 2028
.
How to correct?
try || instead of +
– Motta
ERROR: operator does not exist: double Precision || double Precision
– Italo Rodrigo
cast(Extract(year from D.dt_fiche) as text) || cast(Extract(Month from D.dt_fiche) as text) did not test because I do not have postgresql
– Motta
@Motta tested it like this, but when the month is less than 10, it doesn’t show zero. but I’ve already solved, posted the answer below. Hug
– Italo Rodrigo