Get month name (Access 2003 and VB.NET)
Hi
I have this query:
Quote:
SELECT month(fecha) AS mesFecha, MonthName(month(fecha)) AS nombreMes, year(fecha) AS yearFecha, sum(total) AS salesMonth
FROM facturas
GROUP BY Month(fecha), MonthName(month(fecha)), Year(fecha)
ORDER BY month(fecha);
ie, It returns these:
Quote:
1 January 2008 2300,00
2 February 2008 3499,00
5 May 2008 24901,11
if I run this query from Access it runs ok. But when I'm trying to run it from an app Vb.NET 2003, it displays an error:
"monthname is not defined"
any help?
regards
Re: Get month name (Access 2003 and VB.NET)
try with below query
Code:
SELECT month(fecha) AS mesFecha, FORMAT(fecha,"mmmm") AS nombreMes, year(fecha) AS yearFecha, sum(total) AS salesMonth
FROM facturas
GROUP BY Month(fecha), FORMAT(fecha,"mmmm"), Year(fecha)
ORDER BY month(fecha);