fork download
  1. Date td = Date.newInstance(System.now().year(), System.now().month(), System.now().day()).addDays(-1);
  2. String formattedExpDate = String.valueOf(td);
  3. td = Date.newInstance(System.now().year(), System.now().month(), System.now().day());
  4. String formattedExpDateToday = String.valueOf(td);
  5. system.debug(td)
Success #stdin #stdout #stderr 0.01s 8968KB
stdin
Standard input is empty
stdout
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)
stderr
./prog:1: parse error, expected ')'