-2

I'm new to angular and I need some help in datetime conversion. My datetime in string is Sat, 30 Apr 2022 00:00:00 GMT but I want to compare this date (only Sat, 30 Apr 2022) with current date.

How do I fetch only date and convert it to datatime format in GMT and compare it with the current date?

ninjacode
  • 318
  • 2
  • 18

1 Answers1

0

u can use momentjs library for what

also u can set the format of string what u put like below:

moment(YOUR_DATE, 'YYYY-MM-DD')