Will MySQL allow me to insert a properly formatted string into a datatime field in my MySQL database?
I am parsing a file, combining dates of format yyyyMMdd and times of format HHmmss, and planning to format them into a string like:
"yyyy-MM-dd HH:mm:ss"
I would like to then insert this string into my datetime field (which has the same formatting as the example above" with a insert query.
If this isn't the proper way to handle my problem, what method should I be using? After looking at the MySQL documentation I got the impression that I could do this as long as the formatting was correct. Working with Java's Calendar and Date classes seemed to only have headaches in store for me.