I am facing an issue to update the dataset with data type is date in Condition
Script:
UPDATE blse
SET employment = 2066.3
WHERE date = (i am not sure how)
AND industry = 'Total Nonfarm'
AND state = 'Alabama'
;
I am facing an issue to update the dataset with data type is date in Condition
Script:
UPDATE blse
SET employment = 2066.3
WHERE date = (i am not sure how)
AND industry = 'Total Nonfarm'
AND state = 'Alabama'
;
2
Answers
The Date type formate is YYYY-MM-DD
Example:
so the command must be like
I would recommend to use to_date() if you are casting from a string to accommodate a specific format. Example:
Check doc on to_date function:
https://www.postgresql.org/docs/current/functions-formatting.html