I have '273' added as a day with the following line:
DateTime.newInstance(dStart.year(), dstart.month(), dstart.day()).format('DD-MM-YYYY');
so the output looks like '273-09-2019' - what gives?
I am trying to add a date to a SOQL string and a Date type returns '30-09-2019 00:00:00'. A few suggestions were to convert Date to DateTime and then apply to format. Is there a better way of doing this?