Date td = Date.newInstance(System.now().year(), System.now().month(), System.now().day()).addDays(-1); String formattedExpDate = String.valueOf(td); td = Date.newInstance(System.now().year(), System.now().month(), System.now().day()); String formattedExpDateToday = String.valueOf(td); system.debug(td)
Standard input is empty
Object: Date error: did not understand #td MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254) Date class(Object)>>doesNotUnderstand: #td (SysExcept.st:1448) UndefinedObject>>executeStatements (prog:1)
./prog:1: parse error, expected ')'
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!