DateFormat of DateField causing problem JDE 4.5

I have a DateField, which uses the DateFormat class to display Date

SimpleDateFormat myDtTm = new SimpleDateFormat ("YYYY/MM/dd hh: mm aa");

DateField _dateField = new DateField ("Date:", System.currentTimeMillis (), myDtTm, DateField.DATE_TIME);

Add (_dateField);

DateField is added to the main screen

Problem:

As in hh hour is represented as 05 (i.e. two-digit)

I tested the application for 4.5 and Simulator Date time does not appear as hh(i.e. 05 two digits), it is shown as 5 (i.e. h )

Why does. I'm using _dateField.toString () and obtaining each field as day, month, year, minutes and seconds

public Calendar convertStringToDate(String dateTime)
{
Calendar date = Calendar.getInstance();            date.set(Calendar.DATE,Integer.parseInt(dateTime.substring(0, 2)));
date.set(Calendar.MONTH, Integer.parseInt(dateTime.substring(3,5))-1);
date.set(Calendar.YEAR, Integer.parseInt(dateTime.substring(6,10)));
date.set(Calendar.HOUR, Integer.parseInt(dateTime.substring(11,13)));
date.set(Calendar.MINUTE, Integer.parseInt(dateTime.substring(14,16)));
date.set(Calendar.SECOND, 0);
date.set(Calendar.MILLISECOND, 0);

String am_pm = dateTime.substring(17);

//getIntAM_PM will return AM or PM

int am_pmInt = getIntAM_PM(am_pm);
date.set(Calendar.AM_PM,am_pmInt);
return date;
}

Here, I get error because the time is only a number IE 5, during recovery, so 5: which is not analyze in Int

Help, please...

no need

indexOf(':')

will work fine.

Tags: BlackBerry Developers

Similar Questions

  • Can software update on iphone cause problems when my computer can only move to Mountain Lion?

    Can software update on iphone cause problems when my computer can only move to Mountain Lion?

    When my computer can only be upgraded to Mountain Lion?

    Any Mac that can run Mountain Lion can run El Capitan, as long as the conditions are identical.

    Too little information: you must identify the model of your iPhone and explain exactly your problems. There is no way that anyone would be able to help otherwise.

  • Firmware update recent Airport 7.6.7 causing problems with VoIP

    Hi all

    Firmware update of recent Airport 7.6.7 causing problems with VoIP.

    Unable to connect voip since update...

    Any help appreciated.

    Thank you

    It might be useful to know what VoIP that you use and what type of problem the update affects your VoIP.

    My MagicJack & NetTalk lines properly.

    Jim

  • in iBooks author, how can I change the book ID?  I update often books and hand but ID remains the same, so it caused problems when others discover.  I wish it were as if it were a new book with a new code.

    in iBooks author, how can I change the book ID?  I update often books and hand but ID remains the same, so it caused problems when others discover.  I wish it were as if it were a new book with a new code.

    From the link 'related items' below, see:

    Give your book a new internal ID.

  • It will cause problems if my new iMac has the same id and password that my old iMac that I still have and use

    It will cause problems if my new iMac OS 10.11.3 5 k has the same user id and password as my old 2008 imac OS 10.9.5

    No it just means that you can download and sync past purchases and data to iCloud

  • KB975496 and causing problems KB980408.

    These two updates that I just installed caused problems with my C drive.  The disk check said he cannot work while the disk is used and how have it run at startup says it cannot do the job and use the system restore.  System Restore says that it cannot function without a check disk first.  What should I do?

    Depending on the operating system you have, and if your hardware vendor as long as you media appropriate, you can make a drive that started at the Windows install DVD while repair.

    In Vista (?) and Windows 7 boot from the installation DVD allows you to use repair tools, which is a command line.  The type of command line

    CHKDSK C: /F

    and a repair disc should be performed.

    Caution:-the last time I tried this it turns out that my hard drive was not physically, and for this reason, the disk check has failed, completely destroy the file system and cause a complete data loss.  REAR FIRST.

  • In Windows XP, the $ntUninstall directories can be deleted without causing problems.

    I have Windows XP SP3 POS PC in our retail store lcocations.  These machines have a slightly smaller boot partition.  My question is, when you install updates from Microsoft, it creates an uninstall directory in the Windows directory.  So Windows XP, $ntUninstall directories can be deleted without causing problems or causing previous updates to be reinstalled.

    I have Windows XP SP3 POS PC in our retail store lcocations.  These machines have a slightly smaller boot partition.  My question is, when you install updates from Microsoft, it creates an uninstall directory in the Windows directory.  So Windows XP, $ntUninstall directories can be deleted without causing problems or causing previous updates to be reinstalled.

    The article at the link below gives a detailed explanation of the $ntUninstall directories. This should you guide as to whether or not you can remove folders.

    http://ask-Leo.com/can_ntuninstall_folders_be_deleted.html

  • Event Viewer windows will cause problems with your computer

    Windows Vista Ultimate: Will be the windows event viewer are causing problems, such as freeze ups, slow down, with your computer?

    There is never for me, and I never heard him make.

    I hope this helps.  Good luck.

  • Recovery system causing problems with the size of the screen.

    Due to some problems I had, I finally had to yield and perform a system recovery back to the manufacturer's specifications.  Once this is done, I downloaded all the updates to Vista, all the drivers, etc..  Everything is square and works fine now, with a big problem.  I bought a monitor 20 "a few months ago.  It worked fine before the recovery is done.  Since the resumption, the display is smaller, as if I still had the old monitor 15 '' on the system.  I did that the driver for the monitor is correct and up-to-date.  I found a way to enlarge the display of the size of the screen in an online search, but it does not clear up the problem.  For example... If I go to a site like the Pogo, the bottom of the site is almost normal size for the monitor, but the game pop up displays the size of the screen 15 ''.  I tried everything I know and can't get this last problem fixed.  Any suggestions would be greatly appreciated.  I also checked the resolution and makes sure it's OK for this monitor.  Thanks for your help.

    Do you have the driver from Microsoft or directly from the manufacturer?  If Microsoft, go to the manufacturer website and download THE latest drivers applicable on your screen and the version of Vista (Microsoft sometimes cause problems).  Does the monitor require any firmware - if so, download and install that too much of the manufacturer's web site.  You can also update the video card drivers and firmware just in case it is the underlying cause of the problem - again go to the web site of the manufacturer to get the files rather than using those available through Microsoft.

    Go to start / Control Panel / customization / display settings / and make sure that your monitor is displayed in the drop-down list.  If this is not the case, click on the box and see if you can find your monitor and then select and make the box extend the desktop to this monitor is selected.  Go into the advanced settings, click list all Modes and try one at the top, if it is not already selected (assuming that it is appropriate for your monitor).  If this does not help, try others that are compatible with your monitor to see if you can find one that allows you to achieve your goals.  It may not work, but it's probably worth a try.

    Other than that, I don't know what to think.  You already seem to have covered most if not all of the bases.  If the above does not work, maybe someone else review this thread will have other ideas to offer.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Frequent hard drive exchanges are causing problems for activation of Windows 7?

    I am new to Windows 7.    I frequently switch (turn) the hard drive on my system - say every 6 weeks or more.  I use the same set of 2-3 disks and restore my system from a disk image every time when I exchange them.   Change the drive often happens to cause problems with the activation of Windows 7?   Thank you.

    Hi Lone Star,

    Change the hard drive on systems not prompt swap you for activation but after that the HDD on another system if the operating system is validated activation would be asked that the physical address of machines would have changed.

  • Window update causing problems of printer driver

    Hi, I have a laptop running XP and router wireless computer (WAG54G) and a set of HP6380 in one. About 2 nights ago an update to Windows Installer by himself and rebooted the laptop (even though I have some turned off automatic updates what they seem to be screwing with anything these updates produce still grr)...

    I went to try and print and to found the 6380 was absent from the list of available printers... The problem is not with the wireless network (as it is trendy and functional). I don't know what it does the update of windows... but when I tried to reinstall the drivers for this printer from the disc, he acknowledged that they were already installed... So I uninstalled them instead (and it is taken up only parts of the driver remained and he removed these pieces).

    Then I tried to do a fresh driver... install that took a long time because it got stuck at the end... Finally, he came up with an error and so I tried to introduce him, HP - and received click on a desktop icon... (Icon HP - XP Installation). I tried it but it tells me to 1) Reinstall driver (done twice -) solve printing problems wireless (not a problem at this point given that I have no printer driver and I can use the network wireless for other things very well) well tried anyway... or 2

    Anyone has any suggestions please > in the past when Windows updates have caused problems, I used the system restore to roll back, but this is only a temporary solution - as Windows insists on the updates I want!

    Thank you very much!

    If you have the original HP software CD, look in the folder of the ccc/utils for a L3_unintsall (or similar).  Run for an uninstall very full.

    Reset.

    Now, download the latest version of the software for your printer from the "Support & Driver" link at the top of this page.  DO NOT reinstall from the CD (a good rule is in general not the CDs software, but to go to the website of the manufacturer for the latest and best).

  • Would it be beneficial to allocate all its defaults for each listed default program programs or could that cause problems.

    Original title: default programs

    Would it be beneficial to allocate all its defaults for each listed default program programs or could that cause problems.

    I think it's depend on... for example, if you want to open all types of file of the video file to open in your video player favorite itz acceptable to choose program to "set this program as default"...

    But if you want certain types of video files to open with another player (with double clicking on file)... Choose the second option "Choose defaults for this program"

  • Rename a hard disk will cause problems?

    When I got my new custom Windows 7 PC built last year, the technician just copied over my old XP, which was a Compaq machine. I don't know if he named the "Compaq" c: or if Windows automatically named that. What I want to do is to rename the drive to something more relevant, since this is a Compaq computer.

    If I rename the drive, it causes problems with the applications already installed on it?

    Thanks for your help!

    Cyndi

    Name change is OK. The drive letter (C:\ etc.) is the part you do not want to change (cannot change if Windows is installed on it), if the partition has installed software.
    If a partition has only the files that are not related (target or path) to any software, you can change the drive letter as well.

  • If I started a project in first Cs5 and want to finish it in first Pro CC it causes problems exporting my sequence and get into the new software?

    If I started a project in first Cs5 and want to finish it in first Pro CC it causes problems exporting my sequence and get into the new software?

    Better is to import the cs5 project in the new project of CC.

    And Yes this could have problems, he could not.

    I would have ended up in CS5. Export to the lossless format and encode with SOUL CC until the final destination.

  • Downing, one of my three guests will cause problems in vCenter?

    I need to update the firmware of the controller on my three hosts. The production server only virtual machine that we currently have a very low maintenance window. So I stopped all the virtual machines on the same host I can then shut it to the bottom/update the firmware on this host without causing problems with the rest of the vCenter environment? If I'm able to do, I have another question. Once guests are updates that are not hosting the production server I could move the production server VM to one of the servers updated until the host is updated and then bring him back?

    One of the reasons for getting a cluster is to avoid downtime in the event of a failure of the host, and/or maintenance. As long as the remaining guests have enough resources (CPU, memory) to run more virtual machines, there will be no problems.

    André

Maybe you are looking for

  • Google don't Translate no sound

    Hello.I has been using google translate normally, but since yesterday, pronounce the button isn't work. He is still there, but nothing happens. I have active cookies and flash to it matter. It works in internet explore. Someone knows why?

  • Re: any warranty issue

    I bought a Toshiba Satellite ultrabook October 15 on the Internet by using a local garage - laptop.bg (either by the way, I was not able to register as a customer of Bulgaria for this forum, I had to check the Australia to the 403 error message). Thi

  • Unistalling Photoshop Elements on a computer and install it on another (lost code)

    I move everything from my old computer to my new computer.Old PC: Asus with a disc slot (Windows 7)New computer: HP without disc slot (Windows 8)I have Photoshop Elements 8 with a tablet of bamboo. She included an access code that I lost. I still hav

  • How to update af:listView after you have created a new line

    HelloJdev Version: 12.1.3I have a page which I use to keep customers in a table.I have a dispatcher Panel in my page. I show the name of Custome in a listview in the left side. This view of the list has the defined properties below.selection = single

  • vCD 8 upgrade path

    Hi allCan upgrade you form vCD 5.5 directly to vCD8.0 or are you to go first to 5.6.4?  I can't find anything in the notes version or installation & Upgrade guide.Dave