Filter By Timestamp Scala

[Solved] Filter By Timestamp Scala | Scala - Code Explorer | yomemimo.com
Question : filter by timestamp scala

Answered by : nervous-nightingale-slyri833or49

scala> df.filter(to_date(df("someTimeStamp")) === "2020-01-01").show
+-------+-------------------+
|someCol| someTimeStamp|
+-------+-------------------+
| 1|2020-01-01 23:00:01|
| 2|2020-01-01 00:00:00|
| 3|2020-01-01 12:54:00|
+-------+-------------------+

Source : https://stackoverflow.com/questions/59690151/spark-dataframe-filter-a-timestamp-by-just-the-date-part | Last Update : Thu, 08 Apr 21

Answers related to filter by timestamp scala

Code Explorer Popular Question For Scala