In a MySQL DB, I have two varchar fields. One is for date and one is for time. I need to change the time from CST to GMT. In MySQL how do we convert the combination of these date and time fields from CST to GMT time? It could be helpful if I get some sample queries for retrieve the same.
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
Here's how it works:
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You would use the
Example SQL Fiddle
But, why are you using varchar for your date/time fields? It would be better to use the proper data types