create table mytable (dt_tm string);
insert into mytable values
('2/3/2017 23:37')
,('2/3/2017 23:37')
,('2/3/2017 23:40')
,('2/3/2017 23:50')
,('2/3/2017 23:51')
,('2/3/2017 23:53')
,('2/3/2017 23:55')
,('2/4/2017 0:08')
,('2/4/2017 0:57')
;
select dt_tm
,cast(from_unixtime(unix_timestamp(dt_tm,'dd/MM/yyyy HH:mm'),'yyyy-MM-dd 00:00:00') as timestamp)
from mytable
;
+----------------+---------------------+
| 2/3/2017 23:37 | 2017-03-02 00:00:00 |
| 2/3/2017 23:37 | 2017-03-02 00:00:00 |
| 2/3/2017 23:40 | 2017-03-02 00:00:00 |
| 2/3/2017 23:50 | 2017-03-02 00:00:00 |
| 2/3/2017 23:51 | 2017-03-02 00:00:00 |
| 2/3/2017 23:53 | 2017-03-02 00:00:00 |
| 2/3/2017 23:55 | 2017-03-02 00:00:00 |
| 2/4/2017 0:08 | 2017-04-02 00:00:00 |
| 2/4/2017 0:57 | 2017-04-02 00:00:00 |
| 2/3/2017 23:37 | 2017-03-02 00:00:00 |
| 2/3/2017 23:37 | 2017-03-02 00:00:00 |
| 2/3/2017 23:40 | 2017-03-02 00:00:00 |
| 2/3/2017 23:50 | 2017-03-02 00:00:00 |
| 2/3/2017 23:51 | 2017-03-02 00:00:00 |
| 2/3/2017 23:53 | 2017-03-02 00:00:00 |
| 2/3/2017 23:55 | 2017-03-02 00:00:00 |
| 2/4/2017 0:08 | 2017-04-02 00:00:00 |
| 2/4/2017 0:57 | 2017-04-02 00:00:00 |
+----------------+---------------------+
показать свой код того, что вы пробовали ?? –
d/M/yyyy или M/d/yyyy? –