So it took me about 10 minutes to figure out that Excel has a date_format, date, date.toString() like function. It’s called text(). To get a date format into something which will import nicely into a postgres or mysql database, simply do somthing like this:
text(A1, "yyyy-mm-dd")
And since all the other languages seem to have a more clear “date format” function, here are the corresponding methods:
- .Net/C# – String.Format() or DateTime.ToString()
- php – date()
- mysql – date_format()
- postgres – to_char()
- java – String.Format combined with a java.util.Calendar