Hi,
I'm having an issue with a webapplication and can't seem to trace the error since the results are different on my laptop and on a windows server.
Info is stored into an access database (accdb), including a field "mydate", type date/time - short date format.
The regional settings of my laptop and another machine (win server) are: "Belgium" / "Dutch" / shortdate format = "d/MM/yyyy" (settings in the control panel)
An ASP.net page shows a search form, including a datepicker (using the CalendarExtender from the Ajax control toolkit). The results of the search are shown in a crystal report.
Test on my laptop (correct results)
search for records where mydate = 10/03/2014 --> shows the crystal report with the correct results, mydate is shown as 10/03/2014 (71 pages)
search for records where mydate = 3/10/2014 --> shows the crystal report with the correct results, mydate is shown as 3/10/2014 (2 pages - I added some records with this date for testing purpose)
same test on the server -> results are switched:
search for records where mydate = 10/03/2014 --> shows the crystal report with results 3/10/2014: mydate is shown as 3/10/2014 (2 pages)
search for records where mydate = 3/10/2014 --> shows the crystal report with results 10/03/2014: mydate is shown as 10/03/2014 (71 pages)
So, on the server the day and month seem to switch in the search query (I guess). However, I have no idea why since the code is exactly the same on both machines...
In the web.config file, there's nothing to overrule the regional settings... On my laptop, I can open the access file to check the values and they seem ok. On the server, access isn't installed, so I cannot check if the date is into another format there.
I'm having an issue with a webapplication and can't seem to trace the error since the results are different on my laptop and on a windows server.
Info is stored into an access database (accdb), including a field "mydate", type date/time - short date format.
The regional settings of my laptop and another machine (win server) are: "Belgium" / "Dutch" / shortdate format = "d/MM/yyyy" (settings in the control panel)
An ASP.net page shows a search form, including a datepicker (using the CalendarExtender from the Ajax control toolkit). The results of the search are shown in a crystal report.
Test on my laptop (correct results)
search for records where mydate = 10/03/2014 --> shows the crystal report with the correct results, mydate is shown as 10/03/2014 (71 pages)
search for records where mydate = 3/10/2014 --> shows the crystal report with the correct results, mydate is shown as 3/10/2014 (2 pages - I added some records with this date for testing purpose)
same test on the server -> results are switched:
search for records where mydate = 10/03/2014 --> shows the crystal report with results 3/10/2014: mydate is shown as 3/10/2014 (2 pages)
search for records where mydate = 3/10/2014 --> shows the crystal report with results 10/03/2014: mydate is shown as 10/03/2014 (71 pages)
So, on the server the day and month seem to switch in the search query (I guess). However, I have no idea why since the code is exactly the same on both machines...
In the web.config file, there's nothing to overrule the regional settings... On my laptop, I can open the access file to check the values and they seem ok. On the server, access isn't installed, so I cannot check if the date is into another format there.