Problem with Calendar showing first day events

In my Java Bean, i have the following:
public ResultSet getEvents(GregorianCalendar start, GregorianCalendar end)
          ResultSet rs = null;
          java.sql.Timestamp startDate = new java.sql.Timestamp(start.getTimeInMillis());
          java.sql.Timestamp endDate = new java.sql.Timestamp(end.getTimeInMillis());
          try {
          ps = con.prepareStatement("select * from events where startDate = '" + startDate + "' and startDate <= '" + endDate + "' order by startTime");
          rs = ps.executeQuery();
          catch (SQLException sqle) {}
          return rs;
When ever my JSP page calls for this, it will not show the first day of the month Events. What am i doing wrong?

I would guess that there's an SQLException being thrown, probably due to your database not liking the toString() output of Timestamp. Your code is eating SQLExceptions, though, so you'll never see the error.
You've gone to the trouble of creating Timestamp objects, use them appropriately:ps = con.prepareStatement("select * from events where startDate >= ? and startDate <= ? order by startTime");
ps.setTimestamp(1, startDate);
ps.setTimestamp(2, endDate);
rs = ps.executeQuery();
...

Similar Messages

  • Synching Calendar shows all day events over two days

    Hello, been playing around with this for the last hour.
    I run entourage and sync calendar events via itunes no problems, but today i noticed that some events for example birthdays were running across two days, checked them in calendar and they are fine, also check the events in ical and they are all set as one day.
    When i synch the phone, i get an event running across two days????
    tried various options, removing from one an sycnhing back and to, removed evertyhing from iphone and chose in itunes to Replace information on this iphone yet events are two days. Edit them on the phone and resynch and they appear again as two days.
    Any suggestions?
    Thanks for any advice offered?

    I did, and said that there are others. I did not however specify a specific thread.
    Is there some reason why you cannot search for answers using the search facility ?
    Its not difficult - just like using Google. there are a few threads i have seen in the last week or so, but I'm too lazy to point them out for you.

  • I have a problem with iCal.Since 2 days ago,I couldn't add new event in iCal on my ipad2.It Keeps saying 'No calendar has been set", then if I go to Calendar field,choose one calendar,it gives this msg "That event doesn't belong to that event store".

    I have a problem with iCal.Since 2 days ago,I couldn't add new event in iCal on my ipad2.It Keeps saying 'No calendar has been set", then if I go to Calendar field,choose one calendar,it gives this msg "That event doesn't belong to that event store". I can add event from iCloud and from my iCal on my iMac. Please help

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • Having serious problems with calendar duplications, one birthday now showing 174 times on one day! Help!

    Having serious problems with calendar duplications, one birthday now showing 174 times on one day! Help!

    Having serious problems with calendar duplications, one birthday now showing 174 times on one day! Help!

  • When I drag .ics files into Outlook for Mac 2011, only the all-day events show up. It won't show part-day events.

    I'm attempting to copy events from the Calendar app on my MacBook pro to the Outlook 2011 calendar. When I drop and drag the .ics files to Outlook, it accepts the information, but only shows all day events. I've tried changing events in Calendar to all day, then create the .ics file then drop and drag to Outlook, and even that doesn't work. Is anyone else having that problem? Has anyone found a solution for this?

    Is Macintosh HD2 an external or internal HD? If it is external be sure in Finder > Preferences > General External disks is checked. Similarly in Findeer > Preferences > Sidebar be sure External disks is checked. If it is a second internal HD do you see it in Disk Utlitiy or System Report?

  • Problem with calendar on iMac

    Problem with calendar on iMac since downloading Mavericks and attempting to connect to icloud. Upon opening calendar a window opening stating 'moving calendars to server account' which has been going for days.
    please advise any possible solutions.
    Thanks

    Does this help?
    https://discussions.apple.com/message/23531400#23531400

  • Master Plan - problem with calendar into Subproject

    If the
    save in the sub-project baseline
    and then connecting it to the
    master plan during the publication of
    the master plan, an error is returned
    "not found the appropriate calendar project............".
    The solution is to
    first connect the subproject to the master
    plan and only store in the
    sub-project baseline. Do you know why this is happening
    and whether Microsoft is going to fix it?
    Do you know when I may see the problem
    with calendars, which should be avoided?

    If the
    save in the sub-project baseline
    and then connecting it to the
    master plan during the publication of
    the master plan, an error is returned
    "not found the appropriate calendar project............".
    The solution is to
    first connect the subproject to the master
    plan and only store in the
    sub-project baseline. Do you know why this is happening
    and whether Microsoft is going to fix it?
    Do you know when I may see the problem
    with calendars, which should be avoided?

  • The headteacher has just upgraded his Ipad to I07 and when he goes into the school shared calendar any all day events come out red and then other events on that day are obscured

    The headteacher has just upgraded his Ipad to I07 and when he goes into the school shared calendar any all day events come out red and then other events on that day are obscured as the red covers the whole day

    I  have the same proble. In all views all day events don't show up. If I search for the event, there is a result but it does not appear in the calendar.

  • I'm having problem with my iphone4S first when i updated software to 7.1 after a month or so wifi turned grayed, second when i tried to turn off in the night as soon as i turn it on battery empty now its totaly dead. What should i do with it?

    I'm having problem with my iphone4S first when i updated software to 7.1 after a month or so wifi turned grayed, second when i tried to turn off in the night as soon as i turn it on battery empty now its totaly dead. What should i do with it?

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

  • Since updating my iPhones, iPad and MacBook Pro I'm having problems with Calendars...

    Since updating my iPhones, iPad and MacBook Pro I'm having problems with Calendars - I keep all the details of my work schedule on Calendars but since updating everything I am notified at 9 a.m. before each of my days off. Can someone please tell me how I can stop this? Also, how can I change that time (9a.m.) if I do want to be notified about something?
    Thanks.

    troubleshooting message http://support.apple.com/kb/ts2755
    Do you have MMS turn on in Settings?
    Are you provisioned by your carrier to use MMS?
    Lastly, give your phone carrier a call, as MMS is a carrier feature.

  • Problems with calendar on iCloud

    I am having problems with calendar event created on my IPhone 4S syncing to my IPad.

    Don't worry I've sorted it! I just had to turn off Reminders as well in iCloud. Calendar then worked fine, even when I turned Calendar and Reminders back on.

  • My iphone won't sync with outlook. Same problem with calendar entries

    contacts added to my iphone 4 won't sync with outlook 2003 running on windows 7. Same problem with calendar entries. 

    same here. Have you received any answers?

  • Calendar.app not showing First Day of Week selected in iCal

    I have selected Monday as the first day of the week in iCal. After syncing, Calendar.app on my iPhone 4 does not show Monday as first day of week. My original iPhone 2G (3.1.3, jailbroken) does show the correct start day, Monday.)
    I do not need assistance with my iPhone 2G. I need a solution for my iPhone 4.
    How do I get my iPhone 4 to be in sync with my other calendars?

    That's a real pain. I'm in Australia and the regional settings have Monday as the first week, which throws me out because all my calendars and even settings in iCal have Sunday as the first day of the week (which is what it's supposed to be). To get what I want, I have to set my country as New Zealand, and this messes up my phone number formats (closest to Australia than any of the others that start the week correctly though). It should be an option in the settings!

  • Outlook not showing all-day events in shared calendars

    One of my users cannot see all-day events on shared calendars if those events are marked as "free" (as in the person is not busy or out of the office.) We use these events for a time-off calendar, and being on our help desk she needs to know when
    people are not in the office.
    We just replaced her computer and this was not an issue on the old computer, just the new one. Everyone else can see these events, the issue is just her on this specific computer. She can see all-day events on her own calendar, she can see all-day events
    on shared calendars if the event is not marked as "free", and she can see any event on a shared calendars where the event is not all-day (including "free" events.) The problem is only with all-day "free" events that are on a shared
    calendar, and the issue is only present on one computer.
    We have tried uninstalling and re-installing Office, we have tried resetting her views in the calendar view, we have tried just about every option that we can find within Outlook with no avail.
    Any idea?

    Hi,
    I noticed that the issue only happens to specific user with specific computer. Please do the following checking to narrow down the issue:
    1. please update the Outlook client with the latest patches and service packs.
    2. disable using Exchange cached mode and check whether the issue happens in Online mode in this computer.
    3. Start
    Outlook in safe mode to have a try.
    4. Perform a clean boot
    in your Windows for the new machine.
    Regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Winnie Liang
    TechNet Community Support

  • To cure the March 2013 monthly Calendar problem I amended my All- Day events for April 1 to timed events on my iPad.  Now the Calendar does not load at all on the iPad, but still OK on iPhone 5.  Any suggestions please?

    In order to cure the problem on my iPad of the month of March 2013 only causing the Calendar to close, I amended all "All Day" events on April 1 to timed events.  Now my Calendar will not open, although my Calendar on an iPad 2 and on iPhones 5 &amp; 4 work perfectly.  I have tried turning iPad off/on, but no effect.  Any ideas please?

    I'm having the same issue with my 3rd gen iPad too. I always viewed my calendar in month view. It won't even open since it's stuck on month view.
    I've quit the app (properly closing via taskbar) and re-opened - crashes immediatly.
    Quit the app and rebooted (via holding home/power buttons until restart) and opened - still crashes immediatly.
    Anyone know how I'm able to get access to the app so I can change all day events to timed events in April. Is it just April 1st or all of April? I haven't even opened my iPhones iCal yet to see if it's having the same issue.
    Also, not sure if this will work but iCal on my mac wireless syncs my calendar events. I'm wondering if I change April 1st all day events to timed events whether it'll sync and fix the issue of crashing?

Maybe you are looking for

  • How to give  avi filepath as command line argument

    hi friends my problem is that when i run source code seek.java at following link "http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Seek.html" it works fine with some avi file on any website. for example if url="http://w1.520.telia.com/~u52

  • Virtualbox-modules cannot resolve dependecies

    resolving dependencies... error: cannot resolve "kernel26<2.6.26", a dependency of "virtualbox-modules" error: failed to prepare transaction (could not satisfy dependencies) :: virtualbox-modules: requires kernel26<2.6.26

  • Does Time Machine back up my OS?

    Hey everyone, haven't actually used time machine yet as I'm still deciding on an ext HD but I'd like to know does using time machine back up everything, include my Leopard OS? If the answer is yes, does that mean that I could using my external HD as

  • [SOLVED] How to make the volume knob on my headset work

    I have a Turtle Beach PX3.  It's a USB wireless headset.  I got the sound working and everything and I can control the volume through the XFCE mixer or the ALSA mixer but I would like to be able to use the physical knob.  On Windows 7, it just sends

  • Real Time Report Placed in iFrame and then Within a Web Applet

    Real-Time Reports built and executed BI tool retrieve real-time updates. However, when report URL is placed within an IFRAME and that is then placed in a Web Applet and the Web Applet is placed within a Page Layout Section, the real-time report no lo