How to recover the date in a specific format on button clicked?

I'm trying to update the date in a data template on a user clicks the button, but unfortunately the Date() function gives just a format long unncesseray.  I want just the day/month/year (i.e. 10/09/2013).  How to change the Date() function to achieve this?

 Button {
                                    leftPadding: 30
                                    rightPadding: 30
                                    preferredWidth: 150
                                    horizontalAlignment: HorizontalAlignment.Center
                                    imageSource: "asset:///images/ic_add.png"
                                    onClicked: {

                                        rootItem.ListItem.view.getApp().updateObject(ListItemData.customerID, ListItemData.name, ListItemData.description, Date(), parseInt(ListItemData.lat) + 1, ListItemData.lon, ListItemData.categorySelect, ListItemData.mapurl)
                                    }
                                }

Thanks in advance.  Solutions and love will see for those who help.

Kind regards

Brandon

I was actually able to find a workaround simpler.  I just used objects attached within the key and attached to a date function:

Button {

                                    imageSource: "asset:///images/ic_add.png"
                                    onClicked: {

                                        rootItem.ListItem.view.getApp().updateObject(ListItemData.customerID, ListItemData.name, ListItemData.description, datefield3.text, parseInt(ListItemData.lat) + 1, ListItemData.lon, ListItemData.categorySelect, ListItemData.mapurl)

                                    }
                                    attachedObjects: [
                                        Label {
                                            id: datefield3
                                            text: {
                                                var today = new Date();
                                                (today.getMonth() + 1) + "/" + today.getDate() + "/" + (today.getFullYear() - 2000);
                                            }

                                        }
                                    ]
                                }

Tags: BlackBerry Developers

Similar Questions

  • How to recover the data pin and a location for visitors to the Web site

    need help

    I'm doing a project with asp.net blackberry

    How to recover the data pin and a location for visitors to the Web site when he pressed the button on the web using asp.net?

    so far, this is the only code that works for me to get a location in a web widget:

    http://docs.BlackBerry.com/en/developers/deliverables/17954/CS_Retrieving_a_GPS_loc_by_using_a_web_p...

  • How to recover the data file in Oralcle 10 g...? No backups and no newspaper archiving

    All,

    I need to recover the data file 2, which is for the undo tablespace and it is in the State to recover and I need to recover the data files now.

    But the bad news is we have no backup at all and we have no archive logs (log archiving is disabled in the database)...

    In this case how can I recover the data file...?


    SQL > select a.file #, b.SID, a.status from v$ datafile a, v$ tablespace b where a.ts #= b.ts #;

    FILE NAME STATUS NO.
    ---------- ------------------------------------------------------------------------------------------ -------
    1 /export/home/oracle/flexcube/product/10.2.0/db_1/oradata/bwfcc73/system01.dbf SYSTEM
    * RETRIEVE /export/home/oracle/logs/bw/undotbs01.dbf 2 *.
    3 /export/home/oracle/flexcube/product/10.2.0/db_1/oradata/bwfcc73/sysaux01.dbf online
    4 /export/home/oracle/datafiles/bw/bwfcc73.dbf online
    5 /export/home/oracle/datafiles/bw/bwfcc73_01.dbf online

    SQL > archive logs list;
    Database log mode no Archive Mode
    Automatic archival disabled
    Destination of archive USE_DB_RECOVERY_FILE_DEST
    Sequence of journal online oldest 4940
    Current log sequence 4942

    Hello

    First, you must open a ticket with oracle Support and explore the options

    You can use this note to fix:
    RECOVERY OF A LOST IN A [ID 1013221.6] UNDO TABLESPACE DATA FILE

    If you are unable to drop Undo tablespace as Undo Segment recovery must

    You can download the trace file following the opening of the ticket

    SQL>Alter session set tracefile_identifier='corrupt';
    
    SQL>Alter system dump undo header "";
    
    Go to udump
    
    ls -lrt *corrupt*
    
    Upload this trace file
    
    Also upload the alert log file
    

    Kind regards
    Levi Pereira

    Published by: Levi Pereira on November 29, 2011 13:58

  • How to recover the data type of a column in a table?

    Hello

    I want to retrieve the data type of a column in a table. At the moment I'm querying attribute 'OCI_ATTR_DATA_TYPE', but it is SQLT_CHR varchar2 and nvarchar2 data type columns. I need to make a distinction between these columns of two separate data types. Y at - it all API through which I could get the exact data type of a column, i.e. "nvarchar2?

    Thanks in advance.

    Hashim

    Hello

    It is not a very direct way to do it. What you can do is to call OCIDescribeAny on the table that you want to get information. You can then get the OCI_ATTR_CHARSET_FORM attribute for the column. If the value of the attribute that you get is SQLCS_IMPLICIT, that would mean its a varchar/char/varchar2 column regular. If you get SQLCS_NCHAR, this means that the column is NCHAR. You can get the example of it here:

    http://download.Oracle.com/docs/CD/B14117_01/AppDev.101/b10779/oci06des.htm#446491

    Just look for the section "Recovering for a Table column Datatypes".

    Thank you
    Sumit

  • How to recover the date via a funtion

    Hi all
    I have a table as below

    I need to get the M_RATE for the date that the user will enter, if the date is not in the table, must take the closest more M_RATE of the date (ex: If 23/06/2012 is not there I need to take the rate of 22/06/2012)

    DATE_RATE M_RATE
    29/06/2012 133.500000
    28/06/2012 133.500000
    27/06/2012 133.750000
    26/06/2012 132.900000
    25/06/2012 133.000000
    22/06/2012 133.000000
    21/06/2012 133.000000
    20/06/2012 132.800000
    19/06/2012 132.550000
    18/06/2012 132.350000
    15/06/2012 131.800000
    14/06/2012 132.000000
    13/06/2012 131.700000
    06/12/2012 132.500000
    06/11/2012 131.750000
    06/08/2012 130.400000
    06/07/2012 130.250000
    06/06/2012 130.200000
    06/05/2012 130.600000
    06/01/2012 132.400000
    31/05/2012 132.000000
    30/05/2012 132.250000
    29/05/2012 132.000000
    28/05/2012 131.250000
    25/05/2012 131.000000
    24/05/2012 130.900000
    23/05/2012 130.000000
    22/05/2012 129.750000
    21/05/2012 130.000000
    18/05/2012 129.750000
    17/05/2012 129.250000


    I tried the way below, but could not get the desired result, pz help


    CREATE or replace function f_ex_rat_isu
    (
    ex_date by date

    )
    RETURN number
    is

    rate number: = 0;
    in_date date: = ex_date;

    cursor ex_rat is
    Select distinct
    e.date_rate,
    e.m_rate,
    Chard to_char (e.date_rate, 'MMDDYYYY')
    of e exch_rat

    where e.currency_code = 2

    order by
    e.date_rate desc;


    Start

    for x in ex_rat loop
    If (x.chard = TO_CHAR (in_date, 'mmddyyyy')) then
    rate: = x.m_rate;
    If (rate = 0) then
    in_date: = (in_date-1);

    end if;

    end if;
    end loop;




    Rate of RETURN;

    end;
    create or replace function f_ex_rat_isu
    (
      ex_date in date
    )
    return number
    is
      rate number :=0;
      closest_date date;
    begin
      -- Step 1: find closest date:
      select min(date_rate) keep (dense_rank first order by abs(date_rate-ex_date))
      into closest_date
      from exch_rat;  
    
      -- Step 2: get the m_rate for that date:
      select m_rate
      into rate
      from exch_rat
      where date_rate=closest_date;
    
      return rate;
    end;
    

    The function above will use the line with the lower date, when the parameter is exactly beween to give dates (for example: 06/03/2012).
    If you prefer the higher date, you will need to change select step 1:

    create or replace function f_ex_rat_isu
    (
      ex_date in date
    )
    return number
    is
      rate number :=0;
      closest_date date;
    begin
      -- Step 1: find closest date:
      select max(date_rate) keep (dense_rank first order by abs(date_rate-ex_date))
      into closest_date
      from exch_rat;  
    
      -- Step 2: get the m_rate for that date:
      select m_rate
      into rate
      from exch_rat
      where date_rate=closest_date;
    
      return rate;
    end;
    

    Published by: hm on 08.07.2012 23:30

  • How to extract the data in a grid format in an area of the bean in forms 6i?

    Hello

    I need help from all the gurus and the experienced people in forms 6i. I'm currently building the shape that will have certain text fields and a bean area that displays the records that I had entered. Suite to the essentials is the basic form structure, I am developing

    1. There will be a search form that will have two text fields 'Emp ID' and 'Name Emp' and two buttons 'New' and 'find '.
    2. There is an alternative, which will have an area of bean that allows to display the following columns in it in the form of a GRID
    a. Emp ID
    (b) name of the Emp of
    This form will be also two 'Emp ID' and 'Name Emp' text fields.
    3. when I press 'New' in the search engine so the second form should open and it will be empty. I can enter data into text fields and save the form. The area of the grid (the bean area) must be empty.
    4. when I reopen the search form and enter the 'Emp Id' I just created in the previous step and click on the "Search" button then the following form should open and the "Emp Id" and the text "Emp name" fields must be populated with the data that I created in step 3 and the bean area must also display the record in the form of a grid.

    I'm ok with all parties except the part of area of bean. Can you help me hpw to develop the form with the area of the bean and extract data when wanted and display as a grid?

    Take a look at the link I provided. Francis already has an example of implementation of a Java data grid on a form. The direct link is: http://forms.pjc.bean.over-blog.com/article-1830062.html

    Craig...

  • How to recover the date of all the Mondays of the year.

    I'm trying to figure out how can I determine the actual dates of a day for a whole year.  For example, CF doesn't have a feature that will help me find dates for each Monday throughout 2010?

    Thank you!

    Paul

    (Example 1): Saterdays in 2008

  • How to recover the data store of VMware using EQL Volume snapshot (smart copy)?

    Hi, I use VMware Std 5.1.0b on Dell EQL 6100 series.

    I have a question where my datastore (2 VMs) VM are stored in one of the Volumes EQL. I had created smart copies weekly.

    I tried to recover by creating a volume "cloned" by using one of the smart copies. That's why I would have 2 exact same volumes in EQL (one is updated and the other is 1 week old).

    I can rename them running EQL EQL centenarians. But it doesn't seem to be a way for me to get old EQL volume to vCenter.

    -J' have re-scanned the ESXi for databases and I tried to add, but he can't just see volumes

    Is there a step I missed that "deletes" and ID that distinguishes EQL-current and old EQL?

    When ASM creates stereotypes that they are defined in read ONLY. Make sure that you change this read-write in the first group Manager graphical user interface.  Then rescan.  The LVM. EnableResignature will not work unless it is read-write.

    -joe

  • How to recover the data since the previous backup for iPhone?

    Data restored from iTunes for iPhone; need to go further to get a previous restoration.

    You can only do if you have a previous backup.

    You are given a choice. If is not available, then you don't have a previous backup to restore from.

  • How to search the data in special characters

    Hi all

    How to recover the data, if it has some special characters.

    examples of data
     
                           NO                Name
                             1                 J-O-H-N
                              2                 J*O*H*N
                              3                  JOHN BOSCO
                             4                  JOHN   K
               
    It's like this. If I pass JOHN as keyword query should return all rows. I'm using the version of oracle 10g. Please let me know how to achieve this.



    Kind regards
    Rajasekhar

    You can also use TRANSLATE to get rid of the unwanted characters:

    SQL> with samples as (select 'J-O-H-N' c from dual union all
      2                   select 'J*O*H*N' c from dual union all
      3                   select 'J!O!H!N' c from dual union all
      4                   select 'JOHN BOSCO' c from dual union all
      5                   select 'JOHN   K' c from dual
      6                  )
      7  select *
      8  from   samples
      9  where  upper(translate(c, 'X-*','X')) like '%JOHN%';
    
    C
    ----------
    J-O-H-N
    J*O*H*N
    JOHN BOSCO
    JOHN   K
    

    Note that I added a line to your test data which failed the test voluntarily.

  • I accidentally deleted a volume in Windows 7! How can I recover the data?

    I accidentally deleted a volume in Windows 7! How can I recover the data?

    I created a retractable partion on "D" Drive and later to try to remove it and accidentally I clicked on "D" drive instead of the new partition! "."
    Any ideas to recover data?
    Thank you
    Amal

    Hello

    You can try this free program; no warranty if.

    http://www.Piriform.com/Recuva

    See you soon.

  • my iphone 6 is disabled. can I recover the data

    my iphone 6 is turned off after that I entered the password OK 'evil' has little time. I can recover the data that I didn't use icloud or itunes?

    I searched on the internet and there are some applications that claim to be able to recover data lost on the iphone 6. These applications true or is it a case of me having to throw this phone and get an android who has all the drama of itunes and iclouds?

    most of these applications is authentic, but you must first unlock the iPhone...

    If you only enter the wrong password several times, wait until you enter the password again, and then put it in the correct password.

    If you do not or you have forgotten the password, there is no alternative to 'restore' the iPhone as a sense new, you lose all the data on it. When you have no backups, they will be lost for good.

    Here's how this (method 3 recovery mode):

    If you have forgotten the password for your iPhone, iPad or iPod touch, or your device is disabled - Apple supports

    After that, here's how configure the restored iPhone:

    Start with the iPhone, iPad and iPod touch - Apple Support

    Lex

  • Windows XP does not start. Can I boot Windows from a disk so that I can recover the data?

    Windows XP does not start. Can I boot Windows from a disk so that I can recover the data? This should be a CD because it doesn't have a floppy disk on my laptop drive. It is maybe that my hard drive has begun to fail and therefore cannot locate XP startup files. I can not start using one of the other methods of starting for example. Safe mode. If I can recover the data, I can then reload Windows and check the surface of the disc etc etc. Thank you all for your comments. Steve

    Lately, I'm leaning toward the Hiren's BootCD you can download here:

    http://www.hirensbootcd.NET/

    On the left, click on download, scroll down, choose the most recent version

    The download link is a little hard to see.  It is at the bottom of the page, above the drop for older versions and looks like this (click this component to download the ZIP file):

    Direct HTTP mirror + Torrent, Torrent Magnet

    Click the "Live HTTP Mirror" link to start the download and save the ZIP file on your desktop of somewhere that you can remember.

    The ZIP file is large, so the download will take probably some time to complete.  Then unzip the download to extract theHirens.BootCD.ISO file that will be used to create your new bootable CD.

    Create a bootable CD. ISO file is not the same as simply copying the. File ISO onto a blank CD.  You must use software that includes how to burn a. ISO to a CD to create a bootable CD.

    File ZIP the Hiren is the file BurnToCD.cmd that you can double-click to launch it.  The BurnToCD.cmd will use the file BurnCDCC.exe to burn the. ISO file onto a blank CD using your existing CD burner.  You can also use your own burning software as long as your software is able to create a bootable CD. ISO file.  More modern burning programs can create a bootable CD. ISO image.  Create a CD from an ISO image bootable is not the same as just the file on a CD burning.

    If you need a simple and CD burning, this is a free software popular software:

    http://www.ImgBurn.com/

    Here are some instructions for ImgBurn:

    http://Forum.ImgBurn.com/index.php?showtopic=61

    It would be a good idea to test your new bootable CD on a computer running.

    You may need to adjust the computer BIOS settings to use the CD-ROM drive as the first device to boot instead of the hard drive.
    These adjustments are made before Windows tries to load.  If you miss it, you will need to restart the system again.

    When starting on the Hiren's CD, you will see a menu of options.  Choose Mini XP.

    It will appear while Windows is loading and you will be presented with a desktop computer that has the look and feel of the interface of Windows Explorer, you are already accustomed to using.  You will feel at home.

    Using the Mini XP, you can access the Internet, maneuver around your system, copy files, replace the files, run the scans for malware, etc.  There are dozens of free and useful tools included in the CD that can be used to repair your system, or copy files to another device such as a USB device or an external drive if drop in trying to repair your system.

    If you want to see if you can fix your system, describe what is happening when you try to start and to answer these questions:

    What is your system brand and model?

    What is your Version of XP and the Service Pack?

    Describe your current antivirus and software anti malware situation: McAfee, Norton, Spybot, AVG, Avira!, Defender, ZoneAlarm, PC Tools, MSE, Comodo, etc..

    You have a true bootable XP installation CD (it is not the same as any recovery CD provided with your system)?

  • I want to recover the data on the hard drive using a laptop as a hard drive.

    Original title: Using a laptop as a hard drive...

    On a MAC, I can plug my laptop into my office with a firewire port to access the hard drive on the laptop without the OS being ran on the laptop.  Windows Vista has such a thing?  If so, how do you go?  The hard drive on my Windows laptop fails and we want to try and recover the data, by hooking it to a desktop as shown above with the MACs.

    Thank you in advance!

    Hello

    "There is no way to access the hard drive when there is no operating system and if the hard drive is connected terribly."

    However, you can remove the hard drive from the laptop and connect it to the office with a case of hard disk that comes with the USB cable.

    Reference:

    Space to grow:
    http://Windows.Microsoft.com/en-us/Windows-Vista/room-to-grow-get-more-space-by-using-external-hard-disk-drives

  • I lost some data during a copy and paste procedure between folders on a thumb drive... any ideas how to recover this data?

    I lost some data during a copy and paste procedure between folders on a thumb drive... any ideas how to recover this data?

    I lost some data during a copy and paste procedure between folders on a thumb drive... any ideas how to recover this data?

    If you did a copy and paste, the original files are left intact when they came.  If you did a cut and paste, they are lost if you do not paste them and your paperweight (the location of storage to copy or cut and paste) was allowed.  It would be cleared if you did quite exemplary or cuts too fill it, or if you rebooted.

Maybe you are looking for

  • How iTunes will include marketing / given blank media library?

    Scenario: an accident is stupid enough, I formatted the disk external USB I said iTunes to store all its media (using iTunes preferences). Since I got the vast majority of the data from the formatted disk (Stellar Phoenix to the rescue). It includes:

  • Messages from local files get corrupted when files are moved to different location

    Hello I have several local folders with thousands of messages. Normally I store them on a network mapped to my setup from local folder in Thunderbird driver is similar to Z:\emails.I needed to move the folders the to my computer and what I did was co

  • YouTube makes Firefox stutter and it slows down

    In recent weeks, Youtube freezes Firefox (FF) and makes it slow. And even when you leave Youtube, FF keep given the slow and stuttering. Close FF and it again solved the problem. So somehow FF keeps something from Youtube in its system so the entire

  • Apple continues to request my password of husbands with their username on my iPad.

    I received a message from Apple on my iPad, which is registered in my name, asking the password associated with my user name of husbands. Why this and what that can do to permanently remove it please?

  • Xbox Live Gamertags inactive

    Hello, let me start by apologizing if in the wrong category. Xbox Live site put me in here for support, but absolutely no option category has anything with the Xbox. I tried to get a particular gamertag since I'm on Live 8 or 10 years. It was taken e