1. I don't see anything wrong with the query code here.
2. If you want to send the data for just two variables mention just those variables in the insert into clause for e.g. if you want to insert just date and time write the query as follows : INSERT INTO tablename(date,time) values ('%datevalue%','%timevalue%'); this will work just as fine.
3. Instead of having two independent columns, one for date and the other for time you caould have a single datetime or timestamp column. Look into the specs of each to find out which one is more appropriate in your case.
4. Since InvoiceNum is an auto generated column, you need not pass data for it (I assume it is something like AUTO_INCREMENT in MySQL) you can omit this coulmn name and it's corresponding value from the query.
Alsoyou have not stated what error as such you are getting, mention that to get more specific help.