smalltalkpharo

Convert DateTime to formated String on Pharo 11


DateAndTime now asString returns a string in a format like YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z

Is it possible to create a String based on a DateTime but with a different format?


Solution

  • You can use ZTimestamp for that: https://github.com/svenvc/ztimestamp