QryString = "select Distinct convert(nvarchar(10),examDate,103) as examDate from TRX.studentDetails";
what is equivalent in MYSQL
Mysql datetime
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 30, 2013, 1:55 AM EDT
Try like this
you can have format option
select Distinct CONVERT(examDate, nvarchar(10)) as examDate from TRX.studentDetails
refer below link for more option
http://www.geeksengine.com/database/single-row-functions/conversion-functions.php
Regards,
Iftikar
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 30, 2013, 1:57 AM EDT
try this it may help you
Select DATE_FORMAT(STR_TO_DATE(datestring, '%d/%m/%Y'), '%Y-%m-%d')
for more details check
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format