Regarding a date format

Dear All,
I have a doubt regarding date formats.
i have a date = Wed Jun 24 00:00:00 GMT+300 2009
i want to convert this date in to 24.06.2009
What i tried is
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM d HH:mm:ss Z yyyy");
Date convertedDate = dateFormat.parse(value);
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
String date = sdf.format(convertedDate);
System.out.println(date);But my output was 24.06.0300Some thing happened to my Year field .
Please help me to solve this ....
Thanks and Regards,

shashi_rajak wrote:
"Wed Jun 24 00:00:00 GMT+300 2009" definetely it is not in "General time zone" and "RFC 822 time zone format". But the [SimpleDateFormat api|http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html] tell this also
SimpleDateFormat also supports localized date and time pattern strings. In these strings, the pattern letters described above may be replaced with other, locale dependent, pattern letters. SimpleDateFormat does not deal with the localization of text other than the pattern letters; that's up to the client of the class.
That's not saying anything about changing what the various bits do, though. It's just saying that a particular Locale might use a different letter sequence to represent hours..."XX" instead of "HH", for example. But the Locale equivalent of "z" would still expect the format "GMT+3:00".
hey sha_2008 can you tell what values these methods " toLocalizedPattern()" and " toPattern()" returns on SimpleDateFormat object which created the "Wed Jun 24 00:00:00 GMT+300 2009" string.The OP hasn't mentioned anything about how he got the original date string, so we can't assume it came from another SimpleDateFormat object. In fact, it clearly hasn't.

Similar Messages

  • Regarding simple date format

    Hi,
    Can any one please tell what is simple date format for below format.
    2008-11-04T11:49:04.312-04.00

    Basil wrote:
    I think all are getting confused with my question, I dont want to know how to convert date
    to a a particular format, I want to know if there is any format for 2008-11-04T11:49:04.312-04.00
    like yyyy-MM-dd'T'HH:mm:ss.SSS for 2008-11-04T11:49:04.312. My JDK version is 1.4
    Edited by: Basil on Nov 4, 2008 7:43 AM
    Edited by: Basil on Nov 4, 2008 7:43 AMRead the link for SimpleDateFormat and make one. How is that hard to understand? And it is what you have been being told from the beginning, and would have realised had you actually read the API docs pointed to. All the information you need to do so is there.

  • Regarding the date format

    Hi,
    My requirement is:
    We have to generate a batch number in such a way that
    the first character should be the last digit of the current date
    the second character should be the month identifier(1-9 from Jan to sept and for the rest Oct-A Nov-B and Dec-C)
    the third character should be the day identifier(for dates 1-9,its 1,2..9 and for the rest consecutive dates starting frm a,b,...v)
    Please help me how to achive this.

    Hi
       U can do this by using Character String Operations on DATE and based on value use IFELSE control statement.
       like ur DATE is 20081202 then
                          if date+6(2) = 01.
                            c3 = 1.
                          elseif date+6(2) = 02.
                          endif.
    but this is simple way , u can find some more optamize way.
    Regards
    Sachin

  • Date format problem in web dynpro java

    Currently, the date format that gets displayed in our webdynpro java application is MMDDYYYY...i am assuming this is because the web dynpro application has language resource set to en_US as its Current locale in the web dynpro deployed content section.  Howver i want it to display as DDMMYYYY. I have changed the default properties in visual admin for web dynpro from en to en_GB however this has no impact what so ever as the current locale is always set to en_US even after the change so am wondering this property is hidden some where else.  Now the web dynpro i am talking about is a adobe portal application. Could you give me any pointers as to where else i can look for or how i can change the current locale properly ??
    Regards
    Kal

    The date format in the Web Dynpro Java Application depends upon locale. At runtime WDJ will do the following process to get the current locale for the date format to be determined.
    1. First the WDJ Application will check for the locale set for the user in UME.
    2. If there is no default locale in UME, then the it will check for the locale in the in the browser which in most cases by default is en-us.
    3. If not, then it will check for the sap.systemLocale in the Propertysheet default of Visual Admin
    4. If there no locale specified in Visual Admin, itu2019s taken from the WAS JVM
    Please check the below SAP Note
    http://help.sap.com/saphelp_nw04/helpdata/en/a0/58db515b95b64181ef0552dc1f5c50/frameset.htm
    Regards,
    Chandran S

  • Change date format in PO form

    Hi,
    Currently, the delivery date printed in PO form is in the format of mm/dd/yyyy.
    If I will change the month format into text, say for example, FEB-07-2011, how can I make this happen?
    Is there any other way to accomodate this other than change the print program/form?
    Thanks!
    Best Regards,
    Armie

    Hi,
    Date format copy from setting which you have done in  t.code: SU3 or SU01 in Date Format in Default tab,If you want you can change it according to your requirement.
    Or as you need check your SMARTFORMS which assigned to your PO message type ( NACE) with which you print PO and see possible conversion as required by you with your ABAPer.
    Regards,
    BIju K

  • Translate date format for parameter or suppress format hint at all?

    Hi,
    I have a report with a parameter of type date. When running the report, a parameter prompt is displayed (in German):
    Startdatum
    Geben Sie das Datum im Format "dd.mm.yyyy" ein.
    Because "dd.mm.yyyy" is not German, is it possible to either translate it into "tt.mm.jjjj" or to suppress the format hint at all?
    Regards
    Joern

    You did not say what version of Crystal you are using. I never had this happen in v10 or earlier, nor in 2008.
    I have heard that XI handles dates oddly. If you do us XI of what ever version, do a search on the forum. There have been several posts regarding the date format.
    Debi

  • SAP Business Objects 4.1 - American Date Format Issue

    This issue is something that keeps arising, if your viewing a crystal report, or building a new Webi report in 4.1 and viewing it, the date format seems to come out as M/D/YYYY HH:MM:SS, this never happened in 4.0.
    I will give an example, today I updated a 4.0 to 4.1 using the update path in a development server, and updated to 4.1 SP03 which is the latest. When I decided to write a Web Intelligence Report or create a Crystal report and publish this, all the date formats came out in American date format, and not the standard English one DD/MM/YYYY HH:MM:SS anymore. However if I go to the Live server which I haven't yet updated and is still on 4.0 SP04 Patch 11 and perform exactly the same its in English format as it always was.
    Can someone please enlighten me to what has changed from 4.0 to 4.1 in terms of configuration regarding the date formats changing.
    My server regional settings are English, and using the default GMT date time, so is my machine. 4.0 works 4.1 doesn't work the same.
    I have tried changing the .prm files in the connectionserver\dataaccess folder as well, this doesn't seem to make a difference and also used LOV's in universe objects and when using these in prompts you get ameican format. I have also changed the preferences in the BI Launch Pad to view English locale and the GMT date time for Greenwich Mean Time. 
    Please can someone advise or suggest where I am going wrong here and how to solve this.
    Many Thanks

    Thanks for your quick response. I have done the check on the universe design tool. I have tried the options - Migration forced and set English (UK). I purged the LOVs and refreshed. No luck as yet. Checked the locale and seems to be fine. When i change the BI launchpad - Web Intelligence preferences to HTML, then the LOV displays correctly - dd/mm/yyyy. The behaviour only occurs when displaying LOV in Applet mode. Maybe will have to look at some Java settings. Thanks
    Added Update- I created a variable =GetPreferredViewingLocale() and tested in WEBI Report with a date object. When I use the BI launchpad Web intelligence Preference to HTML - it display EN_GB. When  I use the BI launchpad Web intelligence Preference to Applet - it display EN_US. It seems to be taking preferred viewing locale as US in applet mode is there a way to fix this please.
    Added Update - It was a bug on Infoview and has been resolved on SP4 . The ADAPT Ref is ADAPT01718291. Just finished testing on UAT, going Live next week with SP4. 

  • Date format problum in EP 5.0 for a particular user

    Hi All,
    I am faceing a problum regarding the date format. The problum is that for one particuler user the date format is wrong i.e. (DDMMYYYY) but for all other user it is correct i.e. (MM-DD-YYYY). One thing more all the user belongs to US.
    The unusual thing is that in R/3 system the default date format for all the user is (MMDDYYYY).
    The portal version is 5.0.
    Can any body help me out in this regrad.
    Thanks & Regards

    Has the user selected en_US as their browser Locale?
    Steve

  • Regarding Date Format Conversion

    Hi,
    In my project i am picking the date from the date picker which is a javascript program . Then i am displaying it on a jsp page .It is coming in mm/dd/yyyy format .I have to change it to dd/mm/yyyy format .
    I have the code for date formatting conversion .
    What my doubt is whether  the code should be written inside the jsp page or in the javascript .
    Thanks .

    Hi
    <%@page language="java" import="java.sql.*,java.util.*,java.text.*" %>
    <%SimpleDateFormat sdf= new SimpleDateFormat(dd/mm/yyyy );%>
    <% java.util.Date temp_date = sdf.parse(PassYourDateHere); %>
    use this with your jsp
    Regards
    Abhijith YS

  • Urgent ......regarding date format in SAP Script

    In my MAIN WINDOW  I have date fields like Date of Manifacture, created date and Expiry date.
    So, currently  I am using SET DATE MASK = 'YYYY-MM' and it is printing same format for all fields.
    But now my requirement is I want to show date for Expiry Date like 'YYYY-MM-DD'. For this I defined one temparary variable in the form like below
    DEFINE &outdate& = &mchar-vfdat&
    SET &outdate& MASK = 'YYYY-MM-DD'.
    but still it is showing format YYYY-MM...
    Plz help me how to print my desired date format...
    I am waiting for ur reply...
    Regards,
    Kumar

    Hi Kishore kumar,
    What you can do is befor printing the Expiry date set the date Mask as 'YYYY-MM-DD' and after printing your Expiry Date again set the DATE MASK to 'YYYY-MM'
    i.e.
    /: SET DATE MASK = 'YYYY-MM-DD'
       &mchar-vfdat&
    /: SET DATE MASK = 'YYYY-MM'
    Regards,
    Sunil

  • Regarding Date Format in Scripts

    Hi
    i'm modifying sales order from. In rvorder01 for i'm getting sale order number and date from &VBDKA-VBELN& / &VBDKA-AUDAT& fields but when i'm printing date (VBDKA-AUDAT) it is printing as 23.09.2007 but my requirement is to print the date in 23/09/2007 format . can any one plzz let me know how to convert date format.
    Thanks & Regards
    Munna

    Use this
    /: SET DATE MASK = 'DD/MM/YYYY'.
    &VBDKA-AUDAT&
    Regards,
    SaiRam

  • Regarding Date format in output text file

    Hi Frnds,
    i am taking the data from vbak table into one internal table T_vbak, in that i am having vdatu field also, and after that using GUI_Download function module i am downloading that internal table data to one text file into presentation server.
    But the date format is displaying in yyyymmdd format in the text file, but i want the format like mm/dd/yyyy in the text file, can anybody plz help me....

    Hey Bala,
    You can use the following conversion routine for converting the date from yyyymmdd format into mm/dd/yyyy.
    data: l_date(10) type c.
    Loop at t_vbak into wa_vbak.
    CONCATENATE wa_vbak-vdatu4(2) wa_vbak-vdatu6(2) wa_vbak-vdatu(4) INTO l_date SEPARATED BY '/'.
    wa_vbak-vdatu = l_date.
    modify t_vbak from wa_vbak.
    Endloop.
    Regards,
    Chetan.
    PS: Reward points if this helps.

  • Regarding Date format in Reports.

    Hi All,
    I want to change the Date format in BEx reports. Currently I am getting MM DD YYYY. But I need it as DD MM YYYY. I had gone thru numerous posting on this issue. I changed the Date Settings in SU3. But still I am not getting the Date in correct format. Is there any other place that I have to correct the Date format???
    Regards
    Jay

    Jayanth,
    I feel in your case, going to the System (in menu)-User Profile-Own data then, you get, Maintain user profile. Here you have the option of Maintaining, Date format.
    Hope this helps....

  • Query regarding date format in BIP

    Hi
    1. Is there a way to find the date format which is set in the parameter.
    for eg.- Suppose there is a parameter Startdate mentioned in the format dd-mm-yyyy. If user chooses Startdate: dd-mm-yyyy, can we find the format, so that we can always convert it to one standard dd-mon-yyyy format?
    2. Is there a way to always convert the date to standard dd-mon-yyyy format in BI . Is there an option in BI to do this?
    Thanks
    Amit

    Amit,
    Get your date in this format in XML.
    YYYY-MM-DDThh:mm:ss+HH:MM
    Then there are lot of functions, you can apply on this to get the formatted date you wanted.

  • Regarding TO_DATE function and Default Date Format DD-MON-YY

    I am using oracle 10.2 version. As far as my knowledge default date format is 'DD-MON-YY'. I want to know that why first query is not giving result.
    SQL> select sysdate from dual
    2 where sysdate = to_date('06-JUL-11','DD-MON-YY');
    no rows selected
    SQL> select sysdate from dual
    2 where to_date(to_char(sysdate),'DD-MON-YY') = to_date('06-JUL-11','DD-MON-YY');
    SYSDATE
    06-JUL-11
    Thanks,
    Rohit

    A date in Oracle always contains hours, minutes and seconds. These values can optionally all evaluate to zeroes, at midnight.
    TO_DATE('06-JUL-11','DD-MON-YY') means midnight of the sixth of july 2011.
    So
    sysdate = to_date('06-JUL-11','DD-MON-YY') only at midnight of the sixth of july 2011...
    While during the day, after midnight,
    trunc(sysdate) = to_date('06-JUL-11','DD-MON-YY')and
    sysdate > to_date('06-JUL-11','DD-MON-YY')Max

Maybe you are looking for

  • How to view concurrent request of other users

    We have upgraded recently to R 12. Would really appreciate if some one can guide me how i can allow the super user "A" to be able to view all the concurrent requests that were submitted by various key users of HRMS. I know in 11i there is a profile o

  • Nike+ and moving to new iTunes installation

    I'm installing iTunes on a new computer and want to make sure I don't lose any Nike+ info if I don't have to. Is there a correct way to do this so that I get to keep all my run data from my old machine?

  • Pb with the function "CWMatrix1​.GenEigenV​alueVector​"

    hello. First I want to thanks all the peopole who have help me for my problem. But today there is a new problem. I can use the function "CWMatrix1.GenEigenValueVector", but it donsen't work correctly (I suppose) my code is Dim varD As Variant Dim var

  • Command-1 is a dud in 7

    I upgraded and now I can't use 'command-1' to view iTunes window. It is listed in the help menu's keyboard shortcuts but it doesn't look like it works. 'command-W' and 'command-M' work fine to make the window go away. Anyone found a fix?

  • External OS Command SM49

    Hi All, Is it possible to run External OS Command created in Tcode SM49 by File Adapter. We are running SAP PI IBM OS i5 and need to call RPG program from File Adapter, if i create custom OS command in SM49 and able to execute the same command from F