Drew Royster
Drew Royster

Reputation: 120

MYSQL timestamp conversion

I haven't been able to find a conversion for the format the timestring I have. I need to convert this string into a timestamp.

2016-06-10T19:59:00.833996032Z

Sorry I know this has been answered before I just haven't understood how to do it in my specific case.

Thanks!

Upvotes: 0

Views: 28

Answers (1)

Strawberry
Strawberry

Reputation: 33935

SELECT STR_TO_DATE(@x,'%Y-%m-%dT%H:%i:%s.%f')x;
+----------------------------+
| x                          |
+----------------------------+
| 2016-06-10 19:59:00.833996 |
+----------------------------+

Upvotes: 1

Related Questions