I want to get date without time.
example: I get the date as: 2022-01-22T00:00:00
How can I remove the: T00:00:00
Advertisement
Answer
let var1 = '2022-01-22T00:00:00' let output = var1.split('T')[0] console.log(output)
I want to get date without time.
example: I get the date as: 2022-01-22T00:00:00
How can I remove the: T00:00:00
let var1 = '2022-01-22T00:00:00' let output = var1.split('T')[0] console.log(output)