datestring and datestring_gmt convert timestamps or datetimes from internal to external date-time representation. The external representation is a human-readable ASCII string of up to 30 characters. The external format is: YYYY-MM-DD hh:mm:ss uuuuuu where uuuuuu represents microseconds.