Hi! pls help date functions

hi! i have problem in date functions in java!
1. if i give input date format is dd/mm/yyyyy (or) yyyy/mm/dd (or) mm/dd/yyyy?
the result must be display dd/mm/yyyy only?
pls help me!
thanks and regadrs
senthilraj

http://www.javaalmanac.com/egs/java.text/FormatDate.html
http://www.javaalmanac.com/egs/java.text/ParseDate.html

Similar Messages

  • Help Date function

    Hi,
    I am having a table with start_date column with varchar and the data is like '01/06/2000'. I want to convert it to date date type and update the date to '01-JUN-2000'. If it is possible with the same column then it is ok or i can even create a separeate column with date datatype but how to update '01/06/2000' to '01-JUN-2000'. This is urgent if any one can help it will be appreciated.
    Thanks
    Srinivas

    SQL> -- If your data is like this:
    SQL> SELECT start_date
      2  FROM   your_table
      3  /
    START_DATE
    01/06/2000
    SQL> -- You can just display your existing
    SQL> -- data in a different format:
    SQL> SELECT TO_CHAR (TO_DATE (start_date, 'DD/MM/YYYY'),
      2                           'DD-MON-YYYY')
      3  FROM   your_table
      4  /
    TO_CHAR(TO_
    01-JUN-2000
    SQL> -- or:
    SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'
      2  /
    Session altered.
    SQL> SELECT TO_DATE (start_date, 'DD/MM/YYYY')
      2  FROM   your_table
      3  /
    TO_DATE(STA
    01-JUN-2000
    SQL> -- Or, to add a new column of date data type:
    SQL> ALTER TABLE your_table
      2  ADD (new_start_date DATE)
      3  /
    Table altered.
    SQL> -- To update the new column:
    SQL> UPDATE your_table
      2  SET    new_start_date =
      3         TO_DATE (start_date, 'DD/MM/YYYY')
      4  /
    1 row updated.
    SQL> -- To display the new column in the desired format:
    SQL> SELECT TO_CHAR (new_start_date, 'DD-MON-YYYY')
      2  FROM   your_table
      3  /
    TO_CHAR(NEW
    01-JUN-2000
    SQL> -- or
    SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'
      2  /
    Session altered.
    SQL> SELECT new_start_date
      2  FROM   your_table
      3  /
    NEW_START_D
    01-JUN-2000

  • Download data to Excel- very urgent pls help

    Hi  Experts
    Following is my coding. i need to download and save the it_material table as Excel file.
    pls help me out
    REPORT zvio1001 LINE-SIZE 190
               LINE-COUNT 55
               MESSAGE-ID zz
               NO STANDARD PAGE HEADING.
    TABLES: mara,marce,makt,marc,mvke,zmpkg,t005t,cdhdr.
    DATA : BEGIN OF it_mara OCCURS 0,
             mandt LIKE mara-mandt,          "Client
             matnr LIKE mara-matnr,
             meins LIKE mara-meins,
             laeda LIKE mara-laeda,
             aenam LIKE mara-aenam,
           END OF it_mara.
    DATA : BEGIN OF it_marc OCCURS 0,
           matnr LIKE marc-matnr,
           werks LIKE marc-werks,
           END OF it_marc.
    DATA : BEGIN OF it_makt OCCURS 0,
           matnr LIKE makt-matnr,
           maktx LIKE makt-maktx,
           END OF it_makt.
    DATA : BEGIN OF it_zmpkg OCCURS 0,
           matnr LIKE makt-matnr,
           zppqt LIKE zmpkg-zppqt,
           zspqt LIKE zmpkg-zspqt,
           zpmqt_3 LIKE zmpkg-zpmqt_3,
           END OF it_zmpkg .
    DATA : BEGIN OF it_material OCCURS 0,
             mandt LIKE mara-mandt,          "Client
             werks LIKE marc-werks,
             matnr LIKE marc-matnr,
             maktx LIKE makt-maktx,
             meins LIKE mara-meins,
             zppqt LIKE zmpkg-zppqt,
             zspqt LIKE zmpkg-zspqt,
             zpmqt_3 LIKE zmpkg-zpmqt_3,
             laeda LIKE mara-laeda,
             aenam LIKE mara-aenam,
             date LIKE sy-datum,
             time LIKE sy-uzeit,
             user    LIKE sy-uname,
           END OF it_material.
    P a r a m e t e r s                                                 *
    Start of tabbed screens
    SELECTION-SCREEN BEGIN OF TABBED BLOCK list FOR 20 LINES.
    SELECTION-SCREEN TAB (30) gc_gen USER-COMMAND gen_tab
                                        DEFAULT SCREEN 1001.
    SELECTION-SCREEN TAB (30) gc_view  USER-COMMAND view_tab
                                        DEFAULT SCREEN 1002.
    SELECTION-SCREEN TAB (30) gc_outp  USER-COMMAND outp_tab
                                        DEFAULT SCREEN 1003.
    SELECTION-SCREEN END OF BLOCK list.
    SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK box01 WITH FRAME TITLE text-401.
    PARAMETERS : p_werks LIKE marc-werks OBLIGATORY.
    PARAMETERS : p_vkorg LIKE mvke-vkorg OBLIGATORY.
    SELECT-OPTIONS : s_matnr FOR mara-matnr.
    SELECT-OPTIONS : s_mtart FOR mara-mtart.
    SELECT-OPTIONS : s_mmsta FOR marc-mmsta.                           "A01
    SELECT-OPTIONS : s_dispo FOR marc-dispo.
    SELECT-OPTIONS : s_beskz FOR marc-beskz.
    SELECT-OPTIONS : s_lgpro FOR marc-lgpro.
    SELECT-OPTIONS : s_lgfsb FOR marc-lgfsb.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-014.
    PARAMETERS : p_repall RADIOBUTTON GROUP sel2 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-011.
    PARAMETERS : p_change  RADIOBUTTON GROUP sel2.
    SELECTION-SCREEN COMMENT 36(1) text-013.
    PARAMETERS : p_chgdat LIKE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-010.
    PARAMETERS : p_excdel AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END   OF BLOCK box01.
    SELECTION-SCREEN END OF SCREEN 1001.
    View Selection Screen
    SELECTION-SCREEN BEGIN OF SCREEN 1002 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK box05 WITH FRAME TITLE text-403.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(77) text-109.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-021.
    PARAMETERS: p_sales AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 38(20) text-022.
    PARAMETERS: p_mrp  AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-023.
    PARAMETERS: p_store AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 38(20) text-024.
    PARAMETERS: p_accnt AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-025.
    PARAMETERS: p_cost  AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 38(20) text-026.
    PARAMETERS: p_purch AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END   OF BLOCK box05.
    SELECTION-SCREEN END OF SCREEN 1002.
    SELECTION-SCREEN BEGIN OF SCREEN 1003 AS SUBSCREEN.
    extract format selection
    SELECTION-SCREEN BEGIN OF BLOCK box04 WITH FRAME TITLE text-402.
    PARAMETERS : p_vari LIKE ltdxt-variant OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-009.
    PARAMETERS: p_report RADIOBUTTON GROUP sel1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-016.
    PARAMETERS : p_repcoo RADIOBUTTON GROUP sel1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-017.
    PARAMETERS : p_reppak RADIOBUTTON GROUP sel1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-008.
    PARAMETERS: p_extun RADIOBUTTON GROUP sel1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-007.
    PARAMETERS: p_extpc RADIOBUTTON GROUP sel1.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: p_pcfile LIKE rlgrap-filename
               DEFAULT 'c:\#ups\CLIENTIDCCYYMMDDHHMMSS.ITM'.
                DEFAULT 'd:\P0121205MMM_YYYYMMDD HHMMSS.XLS'.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(40) text-015.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END   OF BLOCK box04.
    SELECTION-SCREEN END OF SCREEN 1003.
    F i e l d   S y m b o l s                                           *
    FIELD-SYMBOLS: <f>.
    D a t a                                                             *
    common include for file layouts
    INCLUDE zvin1010.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'P_PCFILE'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
                     I N I T I A L I Z A T I O N                         *
    INITIALIZATION.
      gc_gen   = text-401.
      gc_outp  = text-402.
      gc_view  = text-403.
    SET up the file directory depending on the system id.
      GET PARAMETER ID 'WRK' FIELD p_werks.
      GET PARAMETER ID 'VKO' FIELD p_vkorg.
      CLEAR s_mtart.
      s_mtart-sign   = 'E'.
      s_mtart-option = 'EQ'.
      s_mtart-low    = 'ROH'.
      s_mtart-high   =  ''.
      APPEND s_mtart.
      CLEAR s_mtart.
      s_mtart-sign   = 'E'.
      s_mtart-option = 'EQ'.
      s_mtart-low    = 'MFPK'.
      s_mtart-high   =  ''.
      APPEND s_mtart.
      CLEAR s_mtart.
      s_mtart-sign   = 'E'.
      s_mtart-option = 'EQ'.
      s_mtart-low    = 'VERP'.
      s_mtart-high   =  ''.
      APPEND s_mtart.
    START-OF-SELECTION.
    check that the download is active
    PERFORM get_data.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM get_data .
    SELECT   mandt matnr meins laeda aenam
    FROM mara
    INTO TABLE it_mara
    WHERE matnr IN s_matnr.
    IF NOT it_mara[] IS INITIAL.
    SELECT matnr werks
    FROM marc
    INTO TABLE it_marc
    FOR ALL ENTRIES IN it_mara
    WHERE matnr = it_mara-matnr
    AND werks = p_werks.
    SELECT matnr maktx
    FROM makt
    INTO TABLE it_makt
    FOR ALL ENTRIES IN it_marc
    WHERE matnr = it_marc-matnr
    AND spras = 'E'.
    SELECT matnr zppqt  zspqt zpmqt_3
       INTO TABLE    it_zmpkg
       FROM zmpkg
       FOR ALL ENTRIES IN it_marc
    WHERE matnr = it_marc-matnr
    AND  werks = p_werks.
    ENDIF.
    LOOP AT it_mara.
    READ TABLE it_marc WITH KEY matnr = it_mara-matnr.
    IF sy-subrc EQ 0.
    READ TABLE it_makt WITH KEY matnr = it_mara-matnr.
    IF sy-subrc EQ 0.
    READ TABLE it_zmpkg WITH KEY matnr = it_mara-matnr.
    IF sy-subrc EQ 0.
    it_material-mandt = it_mara-mandt.
    it_material-matnr = it_mara-matnr.
    it_material-maktx = it_makt-maktx.
    it_material-meins = it_mara-meins.
    it_material-laeda = it_mara-laeda.
    it_material-aenam = it_mara-aenam.
    it_material-werks = it_marc-werks.
    it_material-zppqt = it_zmpkg-zppqt.
    it_material-zspqt = it_zmpkg-zspqt.
    it_material-zpmqt_3 = it_zmpkg-zpmqt_3.
    it_material-date = sy-datum.
    it_material-time = sy-uzeit.
    it_material-user = sy-uname.
    APPEND it_material.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ENDFORM.                    " GET_DATA

    Hi Kumar,
         After building your it_material internal table, try using GUIO_DOWNLOAD to load the data into an excel sheet.
    check this sample code.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = SELECT_FILE   " Filename
          FILETYPE                = 'ASC'
          APPEND                  = ' '
        TABLES
          DATA_TAB                = ITAB_STR_1
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        EXIT.
      ENDIF.
    Hope this is helpful to you. If you need further information, revert back.
    Reward all the helpful answers.
    Regards
    Nagaraj T

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

  • Function error! pls help.

    Here is the code:
    CREATE OR REPLACE FUNCTION id_is_good
    (i_student_id IN NUMBER)
    RETURN BOOLEAN
    AS
    v_id_cnt NUMBER;
    BEGIN
    SELECT COUNT(*)
    INTO v_id_cnt
    FROM student
    WHERE student_id = i_student_id;
    RETURN 1 = v_id_cnt;
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN FALSE;
    END id_is_good;
    Error report:
    ORA-06550: line 5, column 20:
    PL/SQL: ORA-00904: "I_STUDENT_ID": invalid identifier
    ORA-06550: line 2, column 1:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 6, column 1:
    PLS-00372: In a procedure, RETURN statement cannot contain an expression
    ORA-06550: line 6, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 1:
    PLS-00372: In a procedure, RETURN statement cannot contain an expression
    ORA-06550: line 10, column 1:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    This function run troubleless however it can not run troubleless in my computer, I have database though, I mean my database is ok, and i use sql developer but i dont understand why this code cant run good?? pls help me.
    thanks

    RETURN BOOLEANPerhaps you should read Oracle Doc about returning boolean value in SQL.
    Check the following link ->
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:6263249199595
    Your solution might be something like this if you want to return boolean ->
    CREATE OR REPLACE FUNCTION id_is_good(i_student_id IN NUMBER)
    RETURN BOOLEAN
    IS
      v_id_cnt NUMBER;
    BEGIN
      SELECT COUNT(*)
      INTO v_id_cnt
      FROM student
      WHERE student_id = i_student_id;
      IF v_id_cnt > 0 THEN
         RETURN TRUE;
      ELSE
        RETURN FALSE;
      END IF;
    EXCEPTION
    WHEN OTHERS THEN
      RETURN FALSE;
    END id_is_good;Or, if you want to return the value then ->
    CREATE OR REPLACE FUNCTION id_is_good(i_student_id IN NUMBER)
    RETURN NUMBER
    IS
      v_id_cnt NUMBER;
    BEGIN
      SELECT COUNT(*)
      INTO v_id_cnt
      FROM student
      WHERE student_id = i_student_id;
      RETURN v_id_cnt;
    EXCEPTION
    WHEN OTHERS THEN
      RETURN 0;
    END id_is_good;Hope this will help.
    Regards.
    Satyaki De.

  • I got a problem with my personal account data how can i recovery my icloud id information back i can't remember even my birthday pls help me

    I got a problem with my personal account data how can i recovery my icloud id information back i can't remember even my birthday pls help me how to recovery my id information back

    Did you follow all of the instructions provided in the article that you linked from? If not, you must follow each and every step.
    If you have, then all you can do is contact iTunes Support:
    http://support.apple.com/kb/HT5699?viewlocale=en_US
    or by email: https://ssl.apple.com/emea/support/itunes/contact.html
    Cheers,
    GB

  • Hi, i installed ios 5 for my iphone 4 and the camera function on lock screen was on the first few days , now it doesn't show the lock screen . is there any change i can do . Pls help me to solve the issue.

    hi, i installed ios 5 for my iphone 4 and the camera function on lock screen was on the first few days , now it doesn't show the lock screen . is there any change i can do . Pls help me to solve the issue.

    nishaadp wrote:
    ... it stucks with the apple logo ,  nothing works. Is anything i can do?
    See Here for
    Frozen or unresponsive iPhone

  • HT3275 My time machine does not back up and giving me this error message: The backup disk image "/Volumes/Data-1/Amiel's MacBook Pro.sparsebundle" is already in use. Pls help.

    My time machine does not back up and giving me this error message: The backup disk image “/Volumes/Data-1/Amiel’s MacBook Pro.sparsebundle” is already in use. Pls help.

    Make sure that there are no other Macs backing up at the present time.
    Pull the power cord from the back of the Time Capsule
    Count to ten
    Plug the power cord back in
    This will "fix" things about 98% of the time. Post back if you are in the unlucky 2% category.

  • HT1766 please help...we updated ipod2 4.1 to IOS 5.1 at itunes...after it was finished only the contacts were restored...not the music & videos...we found the backed up data in the pc(windows 7)after entering %appdata%..pls help how to restore..thanks!God

    please help...we updated ipod2 4.1 to IOS 5.1 at itunes...after it was finished only the contacts were restored...not the music & videos...iwe found the backed up data in the pc(windows 7)after entering %appdata%..pls help on how to restore...we will appreciate it very much....thanks! God bless!

    The iPod backup that iTunes makes does not include synced media like app, music and videos. Thus, you wll have to resync those back to your iPod.
    If necessary you can redownload iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Hey there, whenever i try to start iTunes in my laptop amsg coming up saying : data execution prevention prevented iTunes from starting (Dep), would you Pls help me out.I have windows vista installed.

    hey there, whenever i try to start iTunes in my laptop amsg coming up saying : data execution prevention prevented iTunes from starting (Dep), would you Pls help me out.I have windows vista installed.

    No, i do not have quickTime player.
    I have tried to close dep off for iTunes but failed to do so as i got a msg that iTunes can't work without Dep in execution data prevention.

  • How to get date and time? pls help~   ~.~

    i tried to get time and date, but dint noe hw to get it.. anyone knows hw to get it? pls help mi ~.~
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.Calendar.*;
    public class Login extends JFrame
    private JFrame mainFrame;
    private JPanel p1;
    private JLabel lblUserId, lblPassword;
    private JTextField tf1, tf2;
    private JButton btnLogin, btnClear;
    public Login()
         mainFrame=new JFrame();
         mainFrame.setTitle("Student Attendance System");
         mainFrame.setSize(400,200);
         mainFrame.setLocation(100,100);
         mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         p1=new JPanel();
         p1.setLayout(new GridLayout(3,2));
         lblUserId=new JLabel("User ID");
         lblPassword=new JLabel("Password");
         tf1=new JTextField(20);
         tf2=new JTextField(20);
         btnLogin=new JButton("Login");
         btnLogin.addActionListener(new ButtonHandler());
         btnClear=new JButton("Clear");
         btnClear.addActionListener(new ButtonHandler());
         p1.add(lblUserId);
         p1.add(tf1);
         p1.add(lblPassword);
         p1.add(tf2);
         p1.add(btnLogin);
         p1.add(btnClear);
         mainFrame.add(p1);
    mainFrame.setVisible(true);
    //inner class event handler
    public class ButtonHandler implements ActionListener
         public void actionPerformed(ActionEvent evt)
              Calendar rightNow = Calendar.getInstance();
              if(evt.getSource()==btnLogin)
                   String login=tf1.getText();
                   String password=tf2.getText();
                   JOptionPane.showMessageDialog(mainFrame, "Student ID "+login+" Login at " + rightNow ,
                   "Response", JOptionPane.PLAIN_MESSAGE);
              if(evt.getSource()==btnClear)
                   tf1.setText("");
                   tf2.setText("");
    public static void main(String []args)
         JFrame.setDefaultLookAndFeelDecorated(true);
         Login l=new Login();
    }

    First off, from http://www.catb.org/~esr/faqs/smart-questions.html
    h1. How To Ask Questions The Smart Way:
    h3. Write in clear, grammatical, correctly-spelled language
    More generally, if you write like a semi-literate boob you will very likely be ignored. So don't use instant-messaging
    shortcuts. Spelling "you" as "u" makes you look like a semi-literate boob to save two entire keystrokes. Worse: writing like
    a l33t script kiddie hax0r is the absolute kiss of death and guarantees you will receive nothing but stony silence (or, at best,
    a heaping helping of scorn and sarcasm) in return.
    Next, use a SimpleDateFormat object. You can use it directly or use a date format string to tell it how you want your date string formatted. The API will give you lots of information on how to use this. Note that you'll have to translate the Calendar object to a date object via the getTime() method:
        class ButtonHandler implements ActionListener
            public void actionPerformed(ActionEvent evt)
                Calendar rightNow = Calendar.getInstance();
                //** use SimpleDateFormat
                SimpleDateFormat dateFormat = new SimpleDateFormat();
                String dateString = dateFormat.format(rightNow.getTime());
                if (evt.getSource() == btnLogin)
                    String login = tf1.getText();
                    String password = tf2.getText();
                    JOptionPane.showMessageDialog(mainFrame, "Student ID " + login
                            + " Login at " + dateString,
                            "Response",
                            JOptionPane.PLAIN_MESSAGE);
                if (evt.getSource() == btnClear)
                    tf1.setText("");
                    tf2.setText("");
        }Finally, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
    &#91;/code]

  • HT4098 I just fill in my credit card to purchase in games but always pls contact itune support, i try to but its hard to change my cc data in it,pls help me,tks

    I just fill in my credit card to purchase in games but always pls contact itune support, i try to but its hard to change my cc data in it,pls help me,tks

    When you get the message to contact iTunes support, that is what you have to do. There is nobody here that can help you, as it must be some issue with your account or credit card that only an Apple employee can help you with.
    Do as instructed in the message and contact iTunes Support. You can start here. Change to your own country if needed by tapping on the link in the upper right corner of this website.
    http://www.apple.com/emea/support/itunes/contact.html

  • G460 Function Menu Bar problem..pls help!

    Dear all,
    I'm new here. I'm a user of G460 laptop. Have one serious problem is the function menu is not popping up even tho already pressed Fn + F5 (or every function it has). For example, when I raise/lower the volume, usually it will pop out a small volume meter on the bottom right corner...I've seen this in my colleague's computer (same model) but mine is not popping up, same goes to the brightness...How to enable back the menu shown in the screen? Pls help...
    Solved!
    Go to Solution.

    32 bit - 64 bit
    right click my computer > properties and check the version of windows 7 ( 32 or 64 bit ) then download the drivers, re-install.

  • I can't update/downloads an app from app store by using by iphone 4s. The icon will change to blank keep waiting, this problem was trouble me for 1 week. pls help me.I try all the method (reset/change date setting)no help my network is ok.

    I can not update/download an app from app store by using my iphone 4s. I try every method by re-setting date/time and reboot the phone etc.NO Help.
    The icon will change to blank keep waiting & can not go in & use in. Anyone have solution for this. pls help me...tks

    .local indicates local activity by the computer host Williams-macbook-pro.local=hostname@domain . The UID of 501 is the standard UID of a local computer administrator.
    Copy and paste this little script in your terminal:
    if [ "SSH_CONNECTION ]; then
         echo I am remote
    else
         echo I am local
    fi
    A return of "i am local" ensures there is no remote connection to your machine (through SSH).
    In the future, to avoid remote entry, I would recommend not posting your IP address though.

  • HT1212 guys!!!! i forgot my itouch password and now it's totally disabled... what else i can do?? i mean my itouch5 is never been sync to any computer... pls help me to get rid of this passcode!! and do all my data and apps will be gone or will it be ther

    guys!!!! i forgot my itouch password and now it's totally disabled... what else i can do?? i mean my itouch5 is never been sync to any computer... pls help me to get rid of this passcode!! and do all my data and apps will be gone or will it be there?? pls

    Forgotten Screen-Lock Passcode
    Connect the iOS device to your computer and try to make a backup
    iOS: How to back up
    Then restore via iTunes. The iOS device will be erased. Place the iOS device in Recovery Mode if necessary to allow the restore.
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store    

Maybe you are looking for