I have a column with the DATETIME format, and I would like to convert it to UNIXTIME in the database. What will be the request?
I know how to convert from UNIXTIME to DATETIME, but I have never done the opposite. I used FROM_UNIXTIME, is there TO_UNIXTIME?
This is UNIX_TIMESTAMP . As an argument, this will take a formatted datetime.
UNIX_TIMESTAMP
Everything is fine, I get it.
I had an "article_date" for the source column. I created "new_date" for the new column.
Then I did:
UPDATE news SET new_date = UNIX_TIMESTAMP(article_date)
Source: https://habr.com/ru/post/1499452/More articles:Prevent datagridview form windows for changing row after cell editing - c #Can't get POST body from Nancy REST server built into Unity game - c #What are "@" and "$" for C / C ++? - c ++NULL NOT NULL defaults to default in sql - sqlandroid: where is android.provider.Telephony.SMS_RECEIVED located? - androidHow to delay the moverover hover () function in jquery and only execute when the cursor is on an element for some given duration - javascriptCMD / windows batch: how to pass double quote and more character in command argument? - command-lineDistinguish one additional call from another - multithreadingJavaFX TreeTableView strings gone while scrolling - javaSalesforce SOQL sets batch loading in REST api - restAll Articles