Hey guys!

Im having a little problem with my datetimepicker!Im making a personal payroll system,where I want to add employee's daily hours!for example:

Employee name:Marcus Veron
IdPayroll:032012

Date|Hours

19/07/2012 | 8
20/07/2012 | 8
21/07/2012 | 7

Well im having problem quering the date field...cause in my datetimepicker i have it custom formated to dd/MM/yyyy but in the database its MM/dd/yyyy.I guess thats where the problem is.When I run this query "Select * From WorkedHours where EmployeeID="employee ID" and PayrollID="Payroll ID" and Date="dtphours.text".

I want it to look if the date exist then update the hours if not then create new registry.How do I do this?I have tried formating the dtp but still it doesnt read the date!!please Help!!

Change the format of your date string before you pass it to the query(i.e. TempDateString = Format(dtphours.text, "yyyy/mm/dd").

sorry didn't change the format string, TempDateString = Format(dtphours.text, "MM/dd/yyyy"). Also you'll have to pass TempdateString to the database not dtphours.text

Edited 3 Years Ago by tinstaafl

This question has already been answered. Start a new discussion instead.