3

Is there any way, other than rebuilding the JDT, to configure the date format of {$date} variables in Eclipse editor templates? Or even creating a new variable to match the format I want?

Hosam Aly
  • 41,555
  • 36
  • 141
  • 182
  • I'm using Eclipse Neon v4.6 RC2 - JDT. The date variable and/or SimpleDateFormat in templates has been updated. I use the following to include date and time: ${d:date('yyyy-MM-dd HH:mm:ss')} See the answer for http://stackoverflow.com/questions/1131712/how-to-set-the-eclipse-date-variable-format – Osmund Francis Aug 18 '16 at 16:49
  • Thanks, @OsmundFrancis – Hosam Aly Aug 30 '16 at 16:56

1 Answers1

1

From what I can see, no, there is no way (using only the current template mechanism)

Only some kind of macro mechanism would allow to record some kind of custom date generation (by opening a Scrapbook, evaluating a System.out.println of a date in the format you want, copy the result and paste it within your code(!)

scrapbook

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250