I have date type column (MySQL):
SELECT invdate FROM invoices;
invdate
-------
2009-08-22
2009-07-12
2009-08-23
-------
and I want get month and year like this:
SELECT DISTINCT MONTH(invdate) AS invmonth, YEAR(invdate) AS invyear FROM invoices;
how to use in C# with SubSonic (SimpleRepository)?
TIA
OMG! I forgot to define variable as date/datetime, so I can not use these functions.
before:
after:
My mistake, I'm sorry. Problem solved.