I have two dates in below format. I have to calculate the difference between two days in Seconds.
currentDateTime="08/Sep/2022:05:26:13"
logDateTime="07/Sep/2022:04:58:30"
diff=$(echo "$(($(date -d "$currentDateTime" +'%s')-$(date -d "$currentDateTime" +'%s')))")
echo $diff
The output is empty. Can someone help me here