Hi, I'm try to extract info from a MySQL DB into a MS SQL DB. The DB is a mess and the developer is no longer available.
All dates are in char fields, and I use
SELECT concat( mid(DueDate, 7, 4), mid(DueDate, 4, 2), mid(DueDate, 1, 2)) as DueDate FROM TableName
to get the date field in a format so MS sql server can import them.
Now, I want to export only the record with the date greater than today, so the questions are:
- What is the equivalent of GetDate() in MySQL?
- Is there a better way to cast the date to make the comparison?