473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Very strange date shifting issue on the ASP page

I have a strange date issue in the ASP application.

Application displays records from the database along with the record date

The same application is installed on two different servers. On both servers application points to the same SQL database accessing it through ODBC connection.

This happens on one server only. It doesn’t happen on another server with the same application.

If ASP app uses an internal Access database, dates look OK.
When application uses the external SQL database , displayed dates are shifted to the right on the second server:

04/06/2010 - correct date on the first server
06/20/0004 – displayed date is shifted right on the second server


When I pull dates manually using WinSQL and the same ODBC connection, dates look OK. How could this shifting happen, is it a server issue or application issue?
Apr 5 '10 #1
4 1665
jhardman
3,406 Expert 2GB
looks like it could be a server issue. My first suggestion would be to always use a non-ambiguous data format (like 06-Apr-2010, etc) when you save into a db, because common numerical date formats are often not standardized.

What is the line of code that puts the date in the db? This might shed light on how 2 servers output two different lines for the same code.

Jared
Apr 5 '10 #2
I think you are right.

ODBC for server 2 – dates pulled incorrectly 3/29/2010 12:00:00 AM
SQL connection server 2 – dates pulled correctly 2010-03-29 00:00:00.000


ODBC and SQL for server 1 both dates are pulled correctly 2010-03-29 00:00:00.000

Those are new servers that were just set up by the local network guy. What should be changed in the ODBC settings to fix date problem, what is not set up correctly?
Apr 5 '10 #3
jhardman
3,406 Expert 2GB
This is a regional setting deep within the sql server. Easiest to change the ASP script at the point where you save the date. If you post that line of code I can help give you a solution.

Jared
Apr 5 '10 #4
Thanks. Unfortunately I cannot touch or change that application, it's a third party masterpiece of art.

But I just found how to fix it. On the server where date was displayed incorrectly, I re-configured SQL connection in the ODBC.

I unchecked “Use regional settings when outputting currency, numbers, dates” in ODBC while reconfiguring connection and I got a correct date.

On the other server that checkbox is checked.

That means whoever set up two similar servers for load balancing, set them up differently, with different regional settings.

But the mystery with dates is solved :)
Apr 5 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Igorati | last post by:
I need some ideas of how to accomplish this task. I was told that I just need to save the input in a file and make the file searchable, nothing fancy like tying into SQL or Oracle. THis is a basic...
5
by: Brian Blazer | last post by:
Hello, I am playing around with pyGoogle and encountered an error that I have never seen, and I am unsure how to correct for it. Here is a code snippet: for r in data.results: print 'Title:...
9
by: Abby Lee | last post by:
http://www.ncsa.uiuc.edu/Divisions/Admin/reimb.asp There is just too much code to place here. onChange you trigger a function to add the numbers in the the column you entered an amount in...
2
by: Tariq Ahmad | last post by:
hi, i am having big issues in deploying my asp.net web application to our web server. dates do not behave the same as on my development machine yet the web.config files are the same and both...
3
by: C Villalba | last post by:
Birth Date and a Purchase Date aata is being stored in sql. This information is retrieved across time zones through a .Net Web Service. When the data is viewed in a .Net client application these...
4
by: Efy | last post by:
Hi, I was debugging my JavaScript in VS2005, the script probably had an error some ware (Line 25), after I fixed the error, I am trying to run the page again I am getting the same error "Illegal...
1
tifoso
by: tifoso | last post by:
I searched here and only found somebody with a round-robin arraylist issue here but what they suggest I tried already and it doesn't work for me I hope somebody can shed some light Scenario: I'm...
9
by: Boltar | last post by:
On 32 bit linux with gcc 4.2 I get unexpected results with this code: main() { int bits = 32; printf("%d\n",(int)1 << (int)32); printf("%d\n",(int)1 << bits); }
12
by: Boltar | last post by:
I seem to be having yet more wierd issue with bit shifting. It seems the following code doesnt do anything under gcc (ie it returns -1 as both results). Anyone know why? Is it another language...
3
by: Vish4u | last post by:
Hello Everyone, I have a encountered a strange issue with the execution of my stored procedure on clients machine. My stored procedure contains a cursor in which there is a select statement...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.