getTimestampText function

String getTimestampText(
  1. Timestamp_ timestamp, [
  2. String infix = ' ',
  3. String suffix = ''
])

Implementation

String getTimestampText(
    Timestamp_ timestamp,
    [
        String infix = ' ',
        String suffix = ''
    ]
    )
{
    return
        '${ getLeftPaddedText( timestamp.year.toString(), 4, '0' ) }:${ getLeftPaddedText( timestamp.month.toString(), 2, '0' ) }:${ getLeftPaddedText( timestamp.day.toString(), 2, '0' ) }'
        '$infix'
        '${ getLeftPaddedText( timestamp.hour.toString(), 2, '0' ) }-${ getLeftPaddedText( timestamp.minute.toString(), 2, '0' ) }-${ getLeftPaddedText( timestamp.second.toString(), 2, '0' ) }'
        '$infix'
        '${ getLeftPaddedText( timestamp.millisecond.toString(), 3, '0' ) }'
        '$suffix';
}