Obtain Todays Date (DD)

I was wondering how I could obtain today’s date (MM-DD-YYYY) on a scrape, more specifically, the numerical value for the day; for example, if 06-21-2023, I would like to obtain the day, which would be 21.

You can use split command to cut a part of the date

@newuserkantu, thanks for the reply so basically i would just need to split the date a third time to remove mm-dd-yyyy?

However, how would you suggest obtaining today’s date as I did not find today’s date in the source code for the site? Currently, 1/2 of the team is on Macs and 1/2 on Windows…

      "Command": "executeScript",
      "Target": "\nvar d= new Date(); return d.getDate().toString().padStart(2, \"0\");",
      "Value": "Date",
      "Description": ""

Your the best I just located the following as well:

var d= new Date(); var d=(d.getDate()); return d;


What is the difference between using your version and the following:

var d= new Date(); var d=(d.getDate()); return d;```

use this
gives same result

Solution provided by @uiuser it is much easier compared to using the split command