Why does the formattedDate variable return incorre...
# suitescript
l
Why does the formattedDate variable return incorrect results? It returns 01/04/2023. Code in the reply section. Thanks.
Copy code
var dateToday = new Date();
     
log.debug('dateToday: ', dateToday)
Copy code
var formattedDate = format.format({
       
 value: new Date(),
        
type: format.Type.DATE,
        
timezone: format.Timezone.AUSTRALIA_PERTH
      
});
log.debug('formattedDate: ', formattedDate)
t
can you try
log.debug('formattedDate: ', new Date(formattedDate))
l
I will try that. Thank you