Although there is a meeting_date in daily_races, how can I lookup the meeting time?

+1 vote
Is there an alternate site for this?
asked Apr 14, 2011 in Smartform by betwise1 Novice (450 points)

1 Answer

+2 votes
 
Best answer

The field you need is scheduled_time in daily_races (also available in historic_races). This contains the race date and time in 'YYYY/MM/DD HH:MM::SS' format.

In MySQL, there is a DATE_FORMAT function that allows you to display any part of this field as you wish.

For example, the following query shows a number of ways to display this - play around with DATE_FORMAT to find the syntax that best suits:

>SELECT scheduled_time, DATE_FORMAT(scheduled_time, '%W %M %Y'), course, DATE_FORMAT(scheduled_time, '%H:%i') from daily_races where meeting_date=CURDATE();

answered Apr 16, 2011 by colin Frankel (19,280 points)
...