Skip to Content
author's profile photo Former Member
Former Member

Changing date format

Hi all

I am using date context variable bound with InputField to get date from user.But it is showing the date in mm/dd/yyyy format when user selects a date.I want to display it in dd/mm//yyyy format when user selects.

How can I do this

Thanks in advance

Fahad Hamsa

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2006 at 01:06 PM

    Hi,

    use this

    SimpleDateFormat fmtDatePlain = new SimpleDateFormat("dd/mm/yyyy");

    String formattedDate = fmtDatePlain.format(date);

    You get the formatted date..

    Regards

    Saravanan K

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2006 at 01:06 PM

    Hi

    try This

    SimpleDateFormat simple=new SimpleDateFormat("DD/MM/yyyy

    ");

    String newdat=simple.format(olddate);

    Kind Regards

    Mukesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2006 at 02:05 PM

    Hi

    do you want to set the dateformat in the portal.

    Kind Regards

    Mukesh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.