-
Date problem server-side
I'm very (no, VERY) new to ASP.NET and I have a server-side app that was written for me by a contractor with whom I have no contact now.
Thing is, this app worked perfectly on a Canadian based server but has now been switched to UK. Fooolishly, the Canadian server was pulled after I thought everything was working on the UK one, but I've discovered a date issue which I could attempt to solve,but since I'm really up against it time-wise, I thought I'd put it out here while i attempt to work it out myself.
Client-side picks up a date. SQL table then has a list of entries with FROM and TO dates and the code retrieves relevant entry where Client-selected date falls between (or on) FROM and TO dates.The following code was working perfectly in Canada, but not so in UK, and this is what is happening: a selected date of 3rd December (3/12) is giving me the entry from 12th March (12/3) - get the picture? Also, since the DD and MM are being switched around, any selected date where day > 12 causes app to crash, since it's obviously looking for 13th month and above. Code is .........
--------------------------------------------------------------------------
' limdb select parameters
cmdSelectLimdb.Parameters("@man_group").Value = strGroup
cmdSelectLimdb.Parameters("@man_date").Value = selectedDate
'cmdSelectLimdb.Parameters("@Check_date2").Value = CDate(txtDate)
' limdb select top
dsCurrentDataSet.Clear()
daLimdb.Fill(dsCurrentDataSet)
currentRow = dsCurrentDataSet.Tables(0).Rows(0)
' Add limdb values
cmdInsertChronForm.Parameters("@boss").Value = "MANAGER: " & currentRow.Item("man_name")
------------------------------------------------------------------------
I have added images of table layout and data (mocked up)


Thanks in anticipation [ ]
-
I remember that we can give the format of the date in SQL Server. So change that to "dd/MM/yyyy" format or while sending the date from .net, convert that to "MM/dd/yyyy" and send. I guess i understood your question properly.
Similar Threads
-
By rperez in forum Database
Replies: 5
Last Post: 01-02-2009, 04:14 PM
-
By skynet news in forum Enterprise
Replies: 0
Last Post: 06-03-2002, 10:27 AM
-
By Aditya in forum Database
Replies: 0
Last Post: 04-29-2002, 07:39 AM
-
By John in forum Enterprise
Replies: 0
Last Post: 03-27-2001, 08:27 AM
-
By Sreedhar Kaluva in forum Database
Replies: 0
Last Post: 02-13-2001, 08:15 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks