Hello guys, newbie here.
Ive been tinkering with VB.NET's database functions lately and I became drowned by a single problem.
I tested this query against MS ACCESS. Im trying to get all the absences of empid 1.
SELECT COUNT(empid)
FROM absences
WHERE empid=4 And FORMAT(date_incurred,'mmmm')="MARCH"
I have an array of months in my application and each element is in text.
The format for date_incurred is dd/mm/yyyy in Ms Access.
What i want to do is to get the month in text format so i can compare it to
My current (and erroneous) code to get the number of absences of an employee in March in VB.NET is :
count = get_results("select empid from absences where empid=" & Me.empid & " and FORMAT(date_incurred,<<what should i write here?>>)=" & "MARCH").Rows.Count
Hoping for your immediate response.
More power!!!
Ive been tinkering with VB.NET's database functions lately and I became drowned by a single problem.
I tested this query against MS ACCESS. Im trying to get all the absences of empid 1.
SELECT COUNT(empid)
FROM absences
WHERE empid=4 And FORMAT(date_incurred,'mmmm')="MARCH"
I have an array of months in my application and each element is in text.
The format for date_incurred is dd/mm/yyyy in Ms Access.
What i want to do is to get the month in text format so i can compare it to
My current (and erroneous) code to get the number of absences of an employee in March in VB.NET is :
count = get_results("select empid from absences where empid=" & Me.empid & " and FORMAT(date_incurred,<<what should i write here?>>)=" & "MARCH").Rows.Count
Hoping for your immediate response.
More power!!!