I (as an unexperienced go programmer) wrote a program (“stolen” from the web) that reads generic database tables and exports this data to a csv file. The program scans database record into a bytes slice then simply assigns a string slice using the string(raw) code.
In case of datetime database field the resulting string value is the default “2006-01-02T15:04:05-0700” go format, so the question is how can i change the resulting format?
Thanks in advance,
What outut do you want instead? Note that what you have is ISO 8601, a very common and portable format for dates and datetimes.