I have date as a string field in form of '2018-01-02 12:12:22', what is the right way to convert it to long int timestamp in ClickHouse SQL?
:) SELECT toUInt64(toDateTime('2018-01-02 12:12:22'));
SELECT toUInt64(toDateTime('2018-01-02 12:12:22'))
┌─toUInt64(toDateTime('2018-01-02 12:12:22'))─┐
│ 1514884342 │
└─────────────────────────────────────────────┘
1 rows in set. Elapsed: 0.001 sec.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With