Calculated field is sorting date from left to right instead of by YYYY/MM/DD

Hi Joe,
you can get any date from any date field then format it the way you want cast it to any calculated field in BAQ using this SQL command, for example

FORMAT(OrderRel.DueDate, 'DD/MM/YYYY')

you can add time and time calculation as well if you want