DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Posts
    1

    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 []

  2. #2
    Join Date
    Aug 2006
    Posts
    84
    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

  1. find version & service packs
    By rperez in forum Database
    Replies: 5
    Last Post: 01-02-2009, 04:14 PM
  2. Replies: 0
    Last Post: 06-03-2002, 10:27 AM
  3. Replies: 0
    Last Post: 04-29-2002, 07:39 AM
  4. microsoft exchange server 5 setup problem
    By John in forum Enterprise
    Replies: 0
    Last Post: 03-27-2001, 08:27 AM
  5. Replies: 0
    Last Post: 02-13-2001, 08:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links