Get() for Calendar Object

This may sound stupid, but I tried now for 3 hours without success:
I created a Calendar "object"(textbox with date, button that allows you to select a date from a menu, and a little lable) with NetBeans design to get the users birthday.
1. How to I get the date(or String) that the users selects(I tried getText(), getValue() and bunch of other stuff) from the calendar "object".(thus, should I do some conversions etc before retrieving the date.)
I just want to get the date and save it as a String in the database.
2. I noticed that you can just choose a date with a year from the current year onwards(thus you can't select for ex 1972). How do a change that for ex the last 100 years can be selected.
Sorry for this common questions, but i am new to jsp.

Are you using the JSF Calendar component as part of netbeans? The one referenced here?
That link demonstrates how to set max/min dates.
Saving a date as a String in a database? Why not actually save it as a sql date/timestamp? Why String?

Similar Messages

  • Changing TimeZone for Calendar object doesnt change its time

    Hy, I have a Calendar object with I have set with a Date but I I want from this calendar with the Date set, set other timezone for this calendar and get the corresponding time(always gettting the correct time if is in daylightsavings) but I get the same time.
    Calendar calendario = Calendar.getInstance
    calendario.setTime(new Date());
    System.out.println(calendario.getTime()); *// for example I get the 14:12:25 hours for GMT+01:00*
    calendario.setTimeZone(TimeZone.getTimeZone("GMT+02:00")); *//change time zone using GMT*
    System.out.println(calendario.getTime()); *// I get the same hour: 14:12:25*
    Why? How to do it using GMT format?
    Thanks
    Edited by: user13162080 on 13-sep-2011 14:31
    Edited by: user13162080 on 13-sep-2011 14:48

    user13162080 wrote:
    Ok, thanks. The last question, this changing of timezone and the hour I am getting, is respecting the timezone daylight saving?, I mean if the TimeZone I set is in daylight savings, I will get the correct hour according to this?What DrClap said.
    However, I think you still may be under some misapprehension about time zones:
    1. A Date does NOT have a timezone, even though it stores a date/time value.
    2. Setting a Calendar's timezone does NOT change the time stored in the Calendar. You may even need to run its complete() or computeFields() method to have the timezone change reflected in all its fields (not sure).
    3. As DrClap said, if you are using a DateFormat to display the Calendar, you need to set its* timezone in order to see what you want (for reason 2 above).
    It's amazing to me that after 10 years this API still gives so many problems (and believe me, you're not the only one).
    One thing you might also want to do is have a look at [url http://joda-time.sourceforge.net/]Joda Time. It's been around for a long time now, and so is quite mature; and is fully interchangeable with standard Java date/time classes. In fact, many of its ideas were under consideration for Java Version 7 as JSR-310, but were decided against (still not quite sure why, as in my view the current API is very poor).
    Winston

  • Calendar object for the next week day

    I have a calendar object,
    How can I get the calendar object the comes on the next Tuesday or for that matter any week day.
    For example I have the calendar object for today ie. Monday, 7th Aug 2006. How can I get the calendar object for the first saturday after today.

    What you do is calculate how many days ahead it is.
    This would be the target day, less today's day
    reduced to modulo 7. Add 7 to guarantee the %
    operator works correctly e.g.
    cal.add(Calendar.DAY_OF_YEAR,(7 + Calendar.SATURDAY -
    cal.get(DAY_OF_WEEK)) % 7);
    Requires that the numeric values associated with the days of the week are ordered and one apart. Even thought this is the case, the API does not say this is the case so it should not be assumed.

  • Calendar object without time

    Hi,
    I need to get a calendar object without displaying the time (hh:mm) field. Can smone help me with this??
    Thanks in advance

    Thanks for the replies..but my requirement is a
    calendar object which i need to set in one of the
    existing bean class set methods which takes in only a
    calendar object (I cant modify the method signature).
    I am pasting my code below..
    The situation is : I get data from database as a
    string read from a file which is then converted into
    a format yyyy-MM-dd using a simple date format. This
    returns a date object which i need to convert to
    calendar without showing the time fields. The prb is
    it is showing the GMT diff as default.
    public static Calendar dateString2Calendar(String s)
    throws ParseException {
    static SimpleDateFormat df = new
    SimpleDateFormat("dd-MMM-yy");
    static SimpleDateFormat df1 = new
    SimpleDateFormat("yyyy-MM-dd");
    Calendar cal = Calendar.getInstance();          
    1 = null;
         Date d2 = null;
         String S1 = null;
         d1 = df.parse(s);
         S1 = df1.format(d1);
         d2 = df1.parse(S1);     
         cal.setTime(d2);     
         return cal;          
    Req output : 2004-09-07
    Current output : 2004-09-07+05:30
    00:00 also not allowed in the output :(The Calendar object represents a particular moment in time - it does not have a format and it always has a time portion. Do not use the toString() method to display it - if you use the System.out.println() method to display it, the toString() method is being still being called. Format the display using SimpleDateFormat as suggested.

  • Facility into Oracle report 9i for Calendar

    Is there any facility into Oracle report builder 9i for Calendar object?

    Hi,
    there is no any opition in oracle report 9i for Calendar if u wanna add Calandar object in ur report 9i then make report parameter form in form9i then add calandar object in forem 9i then call ur report from that parameter form bcoze in form 9i u have opition to add calendar object
    Rizwan

  • Unable to get the admin object for the CsContainerAdmin service

    Hi,
    On AIX, we deployed XIR2 SP2 --> XIR2 SP3 --> SP3 Productivity Pack.
    The Conection server does show up on the server list in the CMC, but on trying to access this server, it throws an error" Unable to get the admin object for the CsContainerAdmin service"
    Tried to manually create another Connection server, same result.
    Is this an issue that is addressed by a later FP?
    Thanks in advance
    Rajesh Jayakumar

    Hi Rajesh,
    Were you able to resolve this issue? I am facing the same issue with almost every BOE 11.5 SP3 server on Windows.
    For example, the Input file server says this -
    "Unable to get the admin object for the FileServerAdmin service for server Input.BOCMSMSGT1.fileserver".
    Getting the same error on WebI Report Server as well -
    There was an error while retrieving data from the server: Unable to get the admin object for the WebiServerAdmin service for server BOPROCENG1.Web_IntelligenceReportServer.webiserver
    Thanks,
    Sarang
    Edited by: Sarang Deshpande on Sep 26, 2008 3:08 PM

  • I can no longer get my calendar to send a reminder e-mail for on a date in the future....alerts no problem

    I can no longer get my calendar to send a reminder e-mail for on a date in the future....alerts no problem

    Try turning the account off and on : Settings > Mail, Contacts, Calendars , then tap the account on the right, slide Mail to 'off', exit settings and go back into the Mail app, and then go back to Settings and slide Mail back to 'on'
    If that doesn't work then try closing the Mail app completely : from the home screen (i.e.not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    Also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I upgraded to iTunes 11.  When I sync my ipad, I don't get any calendar updates on my XP laptop in Outlook 2007.  I can't find any place on iTunes 11 for info.  Help!

    I upgraded to iTunes 11.  When I sync my ipad, I don't get any calendar updates on my XP laptop in Outlook 2007.  I can't find any place on iTunes 11 for info.  Help!

    You might have better luck in the iTunes for Windows community. I'll ask the hosts to relocate your post.
    iTunes for Windows

  • Our exchange server crashed and we lost all contact and calendar data.  We found an app to get the contacts off of people's phone to import but can't find the same for calendar.  How do I get my calendar info off my phone and in to new exchange server?

    Our exchange server crashed and we lost all contact and calendar data.  We found an app to get the contacts off of people's phone to import but can't find the same for calendar.  How do I get my calendar info off my phone and in to new exchange server?

    You'd have to think through this, but it seems like if you are using Outlook, and the items vanished from the Outlook client as well as the server,that you could re-populate Outlook using iTunes. 

  • What is the Table/View name for getting the Database Object Dependencies

    I am running the Database Object Dependencies report to get the reference of Database Object and their respective Application Component.
    Applications xxxx -> Application Reports -> Shared Components -> Database Object Dependencies -> Compute Dependencies
    I want to develop a report for the same purpose, Just want to know what is the APEX Tables / Views they are using to run this report, so that I can use the same Tables to create my own report.
    Thanks,
    Deepak

    Hi Andy,
    when I am using the following query...I am not getting any result...
    select name, type, owner
    from all_dependencies
    where referenced_owner = 'APEX_030200'
    and referenced_name = 'WWV_FLOW_PATCHES'
    AND OWNER= 'XXXXXXX' --- (addeed this to the where clause)
    I modified the query.....I am getting the result.....
    select name, type, owner
    from all_dependencies
    AND OWNER= 'XXXXXXX'
    - But I am not getting which database object(table/view) is using which Application Page/Component like we have in Database Object Dependencies.
    - Also what is this REFERENCE OWNER & REFERENCE_NAME ----
    referenced_owner = 'APEX_030200'
    and referenced_name = 'WWV_FLOW_PATCHES'
    I am little bit confused, Can you pl expalin me in details......
    Thanks,
    Deepak

  • Cannot get a connection, pool error Timeout waiting for idle object

    my connection pool setting is
      maxActive="3" minIdle="2"                maxWait="10000"              removeAbandoed="true" logAbandoned="true"         removeAbandonedTimeout="30"         autoreconnection="true" 
    we have 7 people hitting the group of search functions ,
    about 3 minutes I get
    I got error like
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object         at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)         at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)         at Deferment.showResult.checStudent(showResult.java:135)         at Deferment.showResult.doPost(showResult.java:99)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402)         at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    I just wonder
    1) Cannot get a connection, pool error Timeout waiting for idle object-> cause by connection pool leaking or other problem.
    2) Setting the maxactive to -1 ( suggestion from Google) , if I set my connection to ulimit , waht should I put on minIdle="2"
    3) How can I test my connection pool have problem or not ? is
    SHOW PROCESSLIST; tolding me someinformation? I use Mysql
    Thank you!

    I try something like ps2 = conn.prepareStatement(target);
                ps2.setString(1, UNumber); // set input parameter
                rs = ps2.executeQuery();
                sendMail = 0;//how many rows we can find.
                while (rs.next()) {
                    sendMail++;
                ps2.close();
                rs.close();
                conn.close();
      if ((count1 == 0) || (count2 == 0)) {
                    conn.rollback();
                } else {
                    conn.commit();
                    conn.setAutoCommit(true);
                ps.close();
                calstat2.close();
                conn.close();
    calstat = (CallableStatement) conn.prepareCall("{call findStudent}");
                calstat.executeQuery();
                calstat.close();
                conn.close();is that enought? what else I should do to make sure I did close all the connection, after I use it ?
    thank you

  • I use Office Outlook for mac 2011 to organise my email & calendar. Since updating to OS X Mavericks I have not been able to sync the calendar to my iPhone. What do I need to do to get the calendars syncing again?

    I use Office Outlook for mac 2011 to organise my email & calendar. Since updating to OS X Mavericks I have not been able to sync the calendar to my iPhone. What do I need to do to get the calendars syncing again?

    Jason The Hague wrote:
    Thanks!  But seriously why have Apple disabled the info sync on iTunes?  By 'Upgrading' to Mavericks I've inadvertantly disabled my Apple mobile devices from fulfilling their function.  Come on Apple work with us here!!
    Apple told developers they were removing that service over two years ago. The developers that depended upon it should have done something about it.
    Why did they remove it? My guess is because it was pretty crappy, was difficult to maintain, and wasn't a good solution for multiple devices that could get the info without tethering to a "base" Mac.

  • I have an Ipad using 5.0.01 and am new to the experience. When I click on the icon for calendar, I get the calendar presentation but do not no how to make an entry.  The tutorials all say you click on the " " sign, but there is no such sign in the lower r

    I have an ipad with 5.0.1 and trying to learn how to use it.  When I click on the icon Calender, I get the calendar  presentation but I do not know how to make an entry.  Every tutorial I have looked at says that you click on a + sign in the lower right corner and then make your entry.  I do not have a + sign on my screen.  Can some one help me.

    You can download a complete iPad 2 User Guide here: http://manuals.info.apple.com/en/ipad_user_guide.pdf
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
     Cheers, Tom

  • Getting contacts updated in sync logs after pushing data for activity object

    Hi,
    I used below snippet to create Import Definition for Activity Object using Eloqua Bulk 2.0. 
        "syncActions": null,
        "isSyncTriggeredOnImport": "true",
        "name": "External Activity via Bulk API",
        "updateRule": "always",
        "secondsToRetainData": "3600",
        "fields": {
            "C_EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
            "CampaignID": "{{Activity.Campaign.Id}}",
            "AssetName": "{{Activity.Asset.Name}}",
            "AssetType": "{{Activity.Asset.Type}}",
            "AssetDate": "{{Activity.CreatedAt}}",
            "ActivityType": "{{Activity.Type}}"
    After pushing data for this import definition, I checked sync logs and I found that there was 2 contacts updated.
    Why this happened?
    here is my sample data :
            "C_EmailAddress": "[email protected]",
            "CampaignID": 32,
            "AssetName": "Tradeshow",
            "AssetType": "Tradeshow",
            "AssetDate": "2014-05-12",
            "ActivityType": "Visited Booth"
            "C_EmailAddress": "[email protected]",
            "CampaignID": 32,
            "AssetName": "Tradeshow",
            "AssetType": "Tradeshow",
            "AssetDate": "2014-05-12",
           "ActivityType": "Visited Booth"
    Please find sync logs in attachment.
    thanks

    Hi,
    I used below snippet to create Import Definition for Activity Object using Eloqua Bulk 2.0. 
        "syncActions": null,
        "isSyncTriggeredOnImport": "true",
        "name": "External Activity via Bulk API",
        "updateRule": "always",
        "secondsToRetainData": "3600",
        "fields": {
            "C_EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
            "CampaignID": "{{Activity.Campaign.Id}}",
            "AssetName": "{{Activity.Asset.Name}}",
            "AssetType": "{{Activity.Asset.Type}}",
            "AssetDate": "{{Activity.CreatedAt}}",
            "ActivityType": "{{Activity.Type}}"
    After pushing data for this import definition, I checked sync logs and I found that there was 2 contacts updated.
    Why this happened?
    here is my sample data :
            "C_EmailAddress": "[email protected]",
            "CampaignID": 32,
            "AssetName": "Tradeshow",
            "AssetType": "Tradeshow",
            "AssetDate": "2014-05-12",
            "ActivityType": "Visited Booth"
            "C_EmailAddress": "[email protected]",
            "CampaignID": 32,
            "AssetName": "Tradeshow",
            "AssetType": "Tradeshow",
            "AssetDate": "2014-05-12",
           "ActivityType": "Visited Booth"
    Please find sync logs in attachment.
    thanks

  • Getting sync operation status as Error for Activity Object Eloqua Bulk 2.0

    As mentioned in doumentation https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCBB/index.html#D_Reference/activity-fields.htm%3FTocPath%3DReference%7C_____6
    I have created an Import Definition and later I tried to push data for it, but for sync operation it gave sync status as error.
    Why this import definition returned error for sync operation?
    Below is the sample snippet for import definition I created for Activity object.
       "syncActions":null,
       "isSyncTriggeredOnImport":"true",
       "name":"External Activity 03March",
       "updateRule":"always",
       "secondsToRetainData":"3600",
       "fields":{
          "C_EmailAddress":"{{Activity.Field(EmailAddress)}}",
          "CampaignID":"{{Activity.Campaign.Id}}",
          "AssetName":"{{Activity.Asset.Name}}",
          "AssetType":"{{Activity.Asset.Type}}",
          "AssetDate":"{{Activity.CreatedAt}}",
          "ActivityType":"{{Activity.Type}}"
    here is sample data that I posted for this import:
          "C_EmailAddress":"[email protected]",
          "CampaignID":32,
          "AssetName":"Tradeshow",
          "AssetType":"Tradeshow",
          "AssetDate":"2014-05-12",
          "ActivityType":"Visited Booth"
          "C_EmailAddress":"[email protected]",
          "CampaignID":32,
          "AssetName":"Tradeshow",
          "AssetType":"Tradeshow",
          "AssetDate":"2014-05-12",
          "ActivityType":"Visited Booth"
    Please find sync logs in attachment.
    Thanks

    As mentioned in doumentation https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCBB/index.html#D_Reference/activity-fields.htm%3FTocPath%3DReference%7C_____6
    I have created an Import Definition and later I tried to push data for it, but for sync operation it gave sync status as error.
    Why this import definition returned error for sync operation?
    Below is the sample snippet for import definition I created for Activity object.
       "syncActions":null,
       "isSyncTriggeredOnImport":"true",
       "name":"External Activity 03March",
       "updateRule":"always",
       "secondsToRetainData":"3600",
       "fields":{
          "C_EmailAddress":"{{Activity.Field(EmailAddress)}}",
          "CampaignID":"{{Activity.Campaign.Id}}",
          "AssetName":"{{Activity.Asset.Name}}",
          "AssetType":"{{Activity.Asset.Type}}",
          "AssetDate":"{{Activity.CreatedAt}}",
          "ActivityType":"{{Activity.Type}}"
    here is sample data that I posted for this import:
          "C_EmailAddress":"[email protected]",
          "CampaignID":32,
          "AssetName":"Tradeshow",
          "AssetType":"Tradeshow",
          "AssetDate":"2014-05-12",
          "ActivityType":"Visited Booth"
          "C_EmailAddress":"[email protected]",
          "CampaignID":32,
          "AssetName":"Tradeshow",
          "AssetType":"Tradeshow",
          "AssetDate":"2014-05-12",
          "ActivityType":"Visited Booth"
    Please find sync logs in attachment.
    Thanks

Maybe you are looking for