MySQL Forums
Forum List  »  Newbie

change column type and date format ?
Posted by: Karl Bieser
Date: August 23, 2019 07:15AM

Hi, I am quite a newbie to MySQL (V 5.7.26) usually trying to find answers with the help of "Big G".
However I am stuck with my current topic which is easy for you I guess...so hoping to get some help here

I have a table (TABLE 2), 3.093.511 rows (imported from lots of CSV files...)

colums
Date (VARCHAR)
Time (VARCHAR)
Level (DECIMAL)
Unit (VARCHAR)

As you can see, not only types are wrong, there is also German date format used

Date Time Level Unit
10-07-2019 00:00:00 48.60 dBA
11-08-2019 09:14:51 49.50 dBA
11-08-2019 09:14:52 48.50 dBA

I tried to use the data in my BI cockpit, but of course date and time are not interpreted correctly, due to the type I guess.
Changing the type didn't work...I'll get 0s then only.

So what I'd like to do is adding three other colums with correct format Date, Time, Timestamp, populated and calculated by the columns I have.

Any help aprecciated
Thanks

Options: ReplyQuote


Subject
Written By
Posted
change column type and date format ?
August 23, 2019 07:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.