JavaScript Date/Time functions not working in Run Code Action

Thanks Paul for this clarifycation but this is not what I need. I want to know the date so I can match it a metafield in every order to check if it is the same date. My plan was to get values to check if this was the case, then to iterate trough all the orders and check if they match. Only the metafield is a date so in the condition-block it has to be comparred to a date. Thats why I am trying to get a Date out of the run Code block. Is this possible or do you have another solution?