HTML form Date field - what's the best way to capture it on the backend?

Hi,
What would be a good way to capture a text field that contains a date string?
In my app I have a page with several text fields, that are populated by a calendar pop-up. On the server side I can capture them into a java.util.Date object, but Date is dperecated.
Should I still use Date or is there a better way?
I intend to use the date as part of an SQL query.
Thanks.

The class java.util.Date is not itself deprecated, however several of its methods are.
For converting string -> date, you should use the class java.text.SimpleDateFormat. That allows you to specify format strings such as MM-dd-yyyy hh:mm:ss for converting date -> string -> date.
If you are wanting to set day/month/year on the date object directly, instead of the Date methods setDay, setMonth, setYear, you should instead use the java.util.Calender class:
calendar.set(Calendar.MONTH, 4);
The calendar can then be converted to a Date object by calling calendar.getTime().
If you are going to use the date as part of a sql query, I would recommend using a Prepared statement, and the java.sql.Date/java.sql.Timestamp class as well.
To convert from java.util.Date to java.sql.Date)
jva.util.Date utilDate = Calendar.getInstance().getTime();
java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());cheers,
evnafets

Similar Messages

  • How can I change the order of html form data submitted to me via email?

    I am having customers contact me via an html form posted on my website using the "sendtoemail" command. When I receive the data in an e-mail it  is not presented in the order it appears on the web page and I can't seem to find out what dictates the order the data is presented in or how I can change it.
    Anyone have any ideas on how I can make HTML form data elements appear in the order I want?
    Thanks,
    Andy

    Or find a commercial form-to-email script that is compatible with your server's configuration (PHP, ASP, Perl...) and customize it to your needs.
    Formm@ailer PHP from DB Masters
    http://dbmasters.net/index.php?id=4
    FormToEmail.com (free & pro versions available)
    http://formtoemail.com/formtoemail_pro_version.php    
    Tectite
    http://www.tectite.com/formmailpage.php
    Forms to Go from Bebosoft (script generating software)
    http://www.bebosoft.com/products/formstogo/overview/
    Nancy O.

  • Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Once the user has entered the URL they want to add to the form. You can use the loadXML function to implement some special text in a label...
    var linkValue = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><exData contentType=\"text/html\" xmlns=\"http://www.xfa.org/schema/xfa-template/2.8/\"><body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"Acroform:2.7.0.0\" xfa:spec=\"2.1\"><p style=\"font-weight:bold;text-decoration:none;letter-spacing:0in\">The new link the user have entered is:<a href=\"" + textfield.rawValue + "\">textfield.rawValue</a></p></body></exData>";
      this.resolveNode("lblURL").value.exData.loadXML(linkValue, 1, 1);

  • I have an requirement to map journal fields whats are the functions

    /Journal/JournalSuspenseCostCentre     NULL
    /Journal/JournalBalancingCentre     Lookup from Organisation ID
    /Journal/JournalMultiCompany     u2018Nu2019
    /Journal/JournalBatchNumber     NULL
    /Journal/JournalNumTransactions     Total number of /Journal/JournalLine transactions
    /Journal/JournalBaseDRTotal     Sum of /Journal/JournalLine/JournalLineBaseValue u2013 Debit Values only
    /Journal/JournalBaseCRTotal     Sum of /Journal/JournalLine/JournalLineBaseValue u2013 Credit Values only
    How to map journal fields and whats is the better process type idoc/proxies?please let me know
    HI,
    I have an requirement to map journal fields whats are the functions can i use in message mapping,please help me out
    Journal Line
    Multiple journal lines per header:
    Schema Element     Data
    /Journal/JournalLine/JournalLineCostCentre     Bank account control Cost Centre
    /Journal/JournalLine/JournalLineAccount     Bank account control Account Code
    /Journal/JournalLine/JournalLineMoneyTotal     Transaction Line Amount
    /Journal/JournalLine/JournalLineVolume     NULL
    /Journal/JournalLine/JournalLineDescription     Payee Name
    /Journal/JournalLine/JournalLineChequeBookReference     NULL
    /Journal/JournalLine/JournalLineMatchField     Cheque Number
    NB Contra accounting entries should be posted to:
    Schema Element     Data
    /Journal/JournalLine/JournalLineCostCentre     Bank account control Cost Centre
    /Journal/JournalLine/JournalLineAccount     Bank account control Account Code
    /Journal/JournalLine/JournalLineMoneyTotal     Transaction Line Amount * -1
    /Journal/JournalLine/JournalLineDescription     Payee Name
    /Journal/JournalLine/JournalLineMatchField     Cheque Number
    /Journal/JournalPeriod     Current General Ledger Period
    /Journal/JournalYear     Current General Ledger Year

    There is really no "best" setting here for the AirPort Express devices. If you need more wireless coverage in the area where an Express is located, then it makes sense to configure the Express to "extend" a wireless network.
    If you already have good coverage in an area where an Express is located, then the "join" configuration makes sense.
    I've yet to meet the first user who felt that he/she had too much wireless signal coverage in their home, but you never know.

  • Submitting html form data using ajax

    Hi all
    I am new to ajax..
    i want to save my html form data into DB.
    i usually do it in jsp by submiting data throug form action..
    how can this be done using ajax..pls help me in this case.
    thanx in advance

    This forum is about Sun Studio program development tools for C, C++, and Fortran programming.
    You should ask your question in an appropriate Java forum. At the Sun Forums main page, click the "Java" or "Java ES" tab.

  • What's the best way to capture speech as text in live or recorded Adobe Connection sessions?

    Hi
    What's the best way to capture speech as text in live or recorded Adobe Connection sessions?
    We would like to have a transcript of the presentation. Is Adobe Connect compatible with Dragon speech recognition software - or is there a preferred Adobe product or method?
    We use PCs running Windows 7 Enterprise.
    thanks

    The class java.util.Date is not itself deprecated, however several of its methods are.
    For converting string -> date, you should use the class java.text.SimpleDateFormat. That allows you to specify format strings such as MM-dd-yyyy hh:mm:ss for converting date -> string -> date.
    If you are wanting to set day/month/year on the date object directly, instead of the Date methods setDay, setMonth, setYear, you should instead use the java.util.Calender class:
    calendar.set(Calendar.MONTH, 4);
    The calendar can then be converted to a Date object by calling calendar.getTime().
    If you are going to use the date as part of a sql query, I would recommend using a Prepared statement, and the java.sql.Date/java.sql.Timestamp class as well.
    To convert from java.util.Date to java.sql.Date)
    jva.util.Date utilDate = Calendar.getInstance().getTime();
    java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());cheers,
    evnafets

  • In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms

    In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
    How can i do this?

    Hi,
    You can select the Payment Term at PO Header Level.
    When you book an invoice, that Payment Term will automatically defaulted to Invoice.
    You can define Payment Term in AP.
    Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled  payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
    Payment Terms (Oracle Payables Help)

  • Adobe Reader XI did not save the form data (unlike previous versions). Any way to recover file?

    Adobe Reader XI did not save the form data (unlike previous versions). Any way to recover filled form with data from temp locations?
    I was not aware that ctrl+s no longer works in reader and closed the PDF after savign it(with ctrl+s). However ,the data is lost and there seems to be no way to recover it.
    I cannot find any temp files created by Reader on my system.
    Also to my surprize(and shock), the reader did not even show a warning before closing the PDF. Does anybody know if/where can I recover the file from?
    Guys, Please reply ASAP if you have got any sort of solution!

    Hi Pat,
    Are you using Adobe Reader XI? And not Acrobat. It does not ask me to save the form if there are unsaved changes.
    I have used previous versions of reader for saving this form data and it did allow me to save it with ctrl+s. And those versions did prompt me to save the changes before closing.
    I guess I should not have updated the reader.

  • HT1338 My Mac Book Pro is currently runnng OS X v10.5.8. When I check for updates by clicking the apple icon it tells me that my computer is up to date.  What is the easiest way to upgrade to OS X Lion?  Do I need to get OS X Snow Leopard first?

    My Mac Book Pro is currently runnng OS X v10.5.8. When I check for updates by clicking the apple icon it tells me that my computer is up to date.  What is the easiest way to upgrade to OS X Lion?  Do I need to get OS X Snow Leopard first?

    Yes, there's been no updates to 10.5.8 for quite awhile, next is paid Upgrades.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It looks like they might still have it...
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    If it's a core Duo & not a Core2Duo, then it'll only run in 32 bit mode.
    Lion/101.7 System requirements
        •    x86-64 processor (Macs with an Intel Core 2 Duo, Intel Core i3, Intel Core i5, Intel Core i7, or Xeon processor.)
        •    At least 2GB of memory, I say 6 GB
        •    Latest version of Mac OS X Snow Leopard (10.6.8), with the Mac App Store installed
        •    At least 4GB of disk space for downloading, I say 50 GB.
    Like Snow Leopard, Lion does not support PowerPC-based Macs (e.g., Power Macs, PowerBooks, iBooks, iMacs (G3-G5), eMacs).
    Lion also does not support 32-bit Intel Core Duo or Core Solo based Macs. Rosetta is no longer available in Lion, which means Lion no longer supports PowerPC applications.
    http://en.wikipedia.org/wiki/Mac_OS_X_Lion#System_requirements
    http://www.apple.com/macosx/how-to-buy/
    What applications are not compatible with Mac OS X 10.7 "Lion"?
    http://ow.ly/5Iz09
    http://roaringapps.com/apps:table

  • Using LabView version 6.1, Best way to capture data every 5 milliseconds

    Best way to capture data every 5 ms (milli-seconds) in the .vi diagram when using "Time between Points, and Small Loop Delay tools"

    I have no idea what "Time between Points, and Small Loop Delay tools" is. If this is some code you downloaded, you should provide a linke to it. And, if you want to acquire analog data every 5 milliseconds from a DAQ board, that is possible with just about every DAQ board and is not related to the version of LabVIEW. You simply have to set the sample rate of the DAQ board to 200 samples/sec. If it's digital data, then there will be a problem getting consistent 5 msec data.

  • ISR ADOBE Workflow Scenario - Data doesn't update the Backend

    Hi,
    I am currently working on ISR-LOA Scenario. I have made all the ISR-Form-Process configurations and linked with my workflow. I event tested my process in the backend and portal. The process goes end to end. But does not update the infotyptes. No error was reported either in Portal or Backend. I was able to complete the termination process by copying the SAP standard scenario (STN1) and the workflow task WS17900391. But this LOA is a custom scenario. I dont see any difference? But i am really puzzled about this.
    As a simple process My workflow contains Task TS17900101 - Approve Form task and a mail step. According to, http://help.sap.com/saphelp_erp2005vp/helpdata/en/42/f280b91e5132c3e10000000a1553f6/frameset.htm
    the approve form step doesn't update the backend directly. I also tried task TS17900102 and TS17900108 (Save Data - Background Processing). I also applied authorizations P_ASRCONT and P_ORGIN to WF-Batch user. Please give me your suggestions.
    I was continuing the completed thread Re: Events Definition in Adobe Interactive Form - Help required, but i am opening this new thread.
    Thanks,
    Peterson.

    Hi
             I am facing some strange problem, in my project we are using the new HCM concept using Process Object and not the Notification type,
          I have take standard scenario SBC1 - child birth, done the config and checked the form and also process its not giving any error.
        But when i tried test process execution "HRASR_TEST_PROCESS", getts error message " Work Item Not Found; Workflow Not Started" and "Process Object Not Created",
    when i check the log in SLG1 tcode for Object: HRASR, Subobject: POBJ. "Case 46CC2D7604BB275EE1000000995893A9 does not exist. No administration authorization in Change and Transport System", this error message only consfuse me more.
        Can you help me on this, if you required i will send the screen shot of the error message

  • What's he best way to include Adobe PDFs on my blog?

    What's he best way to include Adobe PDFs on my blog?
    I create worksheets as a teacher and would like to share them from my blog. Currently I am linking to Scribd etc to share PDFs. If I upload the worksheets as an image is there a way to adjust the size/resolution of the PDF for easier viewing? 
    Thanks!

    PDFs are just files. Can you upload files to your blog space? If yes, just upload the PDFs then, in a blog entry, provide the web link (URL) for each file (PDF).
    Or, place the PDFs into your free acrobat.com "files" storage (5GB free). You have one as you have an Adobe ID (needed to make your post here eh).
    https://cloud.acrobat.com/
    You can have acrobat.com provide a "share" link to the PDF. Place that into a blog entry.
    Or - same idea as above (use a "file share" service) -- Microsoft's OneDrive, Adobe's Creative Cloud, Google drive, DropBox, others ...
    Be well...

  • What is a best way to write SQL ?

    Sample Case
    drop table t;
    drop table b;
    create table t ( a varchar2(4), b number, c varchar2(1));
    insert into t values ('A00', 10, 'R');
    insert into t values ('A01', 11, 'R');
    insert into t values ('A02', 12, 'R');
    insert into t values ('A03', 13, 'R');
    insert into t values ('A00', 10, 'P');
    insert into t values ('A01', 11, 'P');
    insert into t values ('A02', 12, 'P');
    insert into t values ('A03', 13, 'P');
    commit;
    create table b ( j varchar(4), k varchar2(1), l varchar2(5), m number(3), n varchar2(5), o number(3));
    insert into b values ('A00', 'P', 'FIXED', 100, 'FLOAT', 60);
    insert into b values ('A01', 'P', 'FIXED', 101, 'FIXED', 30);
    insert into b values ('A02', 'R', 'FLOAT', 45, 'FLOAT', 72);
    insert into b values ('A03', 'R', 'FIXED', 55, 'FLOAT', 53);
    commit;
    10:19:13 SQL> select * from t;
    A B C
    A00 10 R
    A01 11 R
    A02 12 R
    A03 13 R
    A00 10 P
    A01 11 P
    A02 12 P
    A03 13 P
    8 rows selected.
    10:19:19 SQL> select * from b;
    J K L M N O
    A00 P FIXED 100 FLOAT 60
    A01 P FIXED 101 FIXED 30
    A02 R FLOAT 45 FLOAT 72
    A03 R FIXED 55 FLOAT 53
    1/     In table t each reference having 2 records one with P another is with R
    2/     In table b each refrence merged into single record and there are many records which are not existing in table t
    3/      both t and j tables can be joined using a = j
    4/     If from table t for a reference indicator is 'P' then if have to pick up l and m columns, if it is 'R' then I have to pick up n and o columns
    5/     I want output in following format
    A00     P     FIXED          100
    A00     R     FLOAT          60
    A01     P     FIXED          101
    A01     R     FIXED          30
    A02     P     FLOAT          72
    A02     R     FLOAT          45
    A03     P     FLOAT          53
    A03     R     FIXED          55
    6/     Above example is a sample ouput, In above example I have picked up only l,m,n,o columns, but in real example there are many columns ( around 40 ) to be selected. ( using "case when" may not be practical )
    Kindly suggest me what is a best way to write SQL ?
    thanks & regards
    pjp

    Is this?
    select b.j,t.c as k,decode(t.c,'P',l,n) as l,decode(t.c,'P',m,o) as m
    from t,b
    where t.a=b.j
    order by j,k
    J K L M
    A00 P FIXED 100
    A00 R FLOAT 60
    A01 P FIXED 101
    A01 R FIXED 30
    A02 P FLOAT 45
    A02 R FLOAT 72
    A03 P FIXED 55
    A03 R FLOAT 53
    8 rows selected.
    or is this?
    select b.j,t.c as k,decode(t.c,b.k,l,n) as l,decode(t.c,b.k,m,o) as m
    from t,b
    where t.a=b.j
    order by j,k
    J K L M
    A00 P FIXED 100
    A00 R FLOAT 60
    A01 P FIXED 101
    A01 R FIXED 30
    A02 P FLOAT 72
    A02 R FLOAT 45
    A03 P FLOAT 53
    A03 R FIXED 55
    8 rows selected.

  • I'm running firefox 35.01 on macpro OS 10.7.5 what is th best way to do ftp?

    I'm running firefox 35.01 on macpro OS 10.7.5 what is th best way to do ftp?

    Do you mean '''F'''ile '''T'''ransfer '''P'''rotocol (FTP) ?
    Please give more details.

  • What are the backend configuration required for photo upload from portal?

    Hi all,
    When i am trying to upload the photo from portal  it is giving error
    can not archive the photo
    we are using portal 7 and  ecc 6.0
    I want to know
    What are the backend configuration required for photo upload from portal
    Can any but help me out
    Rajendra

    Hi,
    Are you using the standard iview. If that's the case you need to configure in the backend. Meaning you need to store the photo in the Org management(HR) which the HR functional guys will do. You just need to add the iview to your role.
    Let me know if you require further informationn.
    Award points if helpful.
    Cheers,
    sathya

Maybe you are looking for

  • How can i prevent iphoto from opening when i plug in my iphone to the computer?

    Hi There, I have  a question, when I connect my iPhone to the computer the iPhoto automatically opens. how can i prevent this from happening? it always slows down my computer. any help will be appreciated. thanks

  • PDF file does not contain some of the symbols from Math Type save in a Word Document?

    I write my math documents in Word using Math Type. The PDF drops parentheses and some math symbols such as x=bar and p-hat. anyone else have this problem?

  • Windows trouble...

    Hi all As you can see I have boot camped my imac. I am now having a few nproblems with windows. The slider to adjust the display brightness makes the whole system freeze. Also, sometimes the display goes black for a split second then white text on a

  • DVDSP closes when I select asset to import

    I have exported a project from Final cut pro with chapter markers into a DV NTSC 48 khz quicktime. Whenever i attempt to import it into DVD studio pro, it must close 'unexpectedly.' I can still import other quicktime movies to DVDSP from the same ext

  • How to Free Up Memory Away from Computer

    I'm on the road and there is an album I want to download from iTunes onto my iPhone. There is not enough room on my phone and I need to delete some videos from my phone. How do I do this without having access to my computer? Any other ideas would hel