Created on 08-01-2018 10:13 PM - edited 09-16-2022 06:32 AM
I have Timestamp column 2018-08-01 05:02:22.0 , i need to consider or filter the data from the datframe for last 24hrs.
Created 08-01-2018 10:36 PM
You can use filter function on the data frame
import org.apache.spark.sql.functions._ df.filter(col("<timestamp_column_name>") > lit(date_sub(current_date,1))).show(10,false)
Created 08-03-2018 04:15 PM
Thanks that worked