Hi,
I have an SQL query which is appending a record onto a table. Part of this append query is to insert a date which is returned from a function into a field in the record. This field has it's format set to "Short Date" and the input mask is "99/99/0000;0;_"
Here's the problem: The getStartDate() function will return a date like, 06/01/2003 i.e. 06 January 2003 but when this is inserted into the record it changes to 01/06/2003 i.e. 01 June 2003! It keeps mixing up/swapping the day and month parts of the date.
Why the hell is this happening! The function returns the date correctly and in the correct format? I cannot figure it out.
Below is the SQL. The StartDate is the one that's giving trouble. The EndDate value I take off a form and I have no problems with this. Both date fields have identical formats. Any help would be greatly appreciated.
Thanks,
Liam
"INSERT INTO PREV_ISSUED ( [Stock Item No], [Start Date],[End Date], Place, Team, Person ) SELECT " & getStockItemNo() & ", #" & getStartDate() & "#, #" & Me!EndDate & "#, " & getPlace() & ", " & getTeam() & ", " & getPerson()
I have an SQL query which is appending a record onto a table. Part of this append query is to insert a date which is returned from a function into a field in the record. This field has it's format set to "Short Date" and the input mask is "99/99/0000;0;_"
Here's the problem: The getStartDate() function will return a date like, 06/01/2003 i.e. 06 January 2003 but when this is inserted into the record it changes to 01/06/2003 i.e. 01 June 2003! It keeps mixing up/swapping the day and month parts of the date.
Why the hell is this happening! The function returns the date correctly and in the correct format? I cannot figure it out.
Below is the SQL. The StartDate is the one that's giving trouble. The EndDate value I take off a form and I have no problems with this. Both date fields have identical formats. Any help would be greatly appreciated.
Thanks,
Liam
"INSERT INTO PREV_ISSUED ( [Stock Item No], [Start Date],[End Date], Place, Team, Person ) SELECT " & getStockItemNo() & ", #" & getStartDate() & "#, #" & Me!EndDate & "#, " & getPlace() & ", " & getTeam() & ", " & getPerson()