Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7930737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:31:13+00:00 2026-06-03T20:31:13+00:00

Using SimpleDateFormat is a standard way to do String <-> Date conversion in Java.

  • 0

Using SimpleDateFormat is a standard way to do String <-> Date conversion in Java.

But this class is not present in GWT JRE Emulation library so we can’t use it in GWT client-side code.

What is standard/recommended way of doing this conversion, then?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:31:14+00:00Added an answer on June 3, 2026 at 8:31 pm

    As given an example in Date Time Format, this may be helpful.

    public class DateTimeFormatExample implements EntryPoint {
    
      public void onModuleLoad() {
        Date today = new Date();
    
        // prints Tue Dec 18 12:01:26 GMT-500 2007 in the default locale.
        GWT.log(today.toString(), null);
    
        // prints 12/18/07 in the default locale
        GWT.log(DateTimeFormat.getShortDateFormat().format(today), null);
    
        // prints December 18, 2007 in the default locale
        GWT.log(DateTimeFormat.getLongDateFormat().format(today), null);
    
        // prints 12:01 PM in the default locale
        GWT.log(DateTimeFormat.getShortTimeFormat().format(today), null);
    
        // prints 12:01:26 PM GMT-05:00 in the default locale
        GWT.log(DateTimeFormat.getLongTimeFormat().format(today), null);
    
        // prints Dec 18, 2007 12:01:26 PM in the default locale
        GWT.log(DateTimeFormat.getMediumDateTimeFormat().format(today), null);
    
        // A custom date format
        DateTimeFormat fmt = DateTimeFormat.getFormat("EEEE, MMMM dd, yyyy");
        // prints Monday, December 17, 2007 in the default locale
        GWT.log(fmt.format(today), null);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using java.text.SimpleDateFormat to parse string representations of date/time values inside an XML document.
I am trying to convert a string to proper date format using Java's SimpleDateFormat
Is it possible to format a date time in Java using the SimpleDateFormat class
I am using SimpleDateFormat to display a Calendar like this : public String getDate()
The following Java code just parses a date (with time portion) 2009-01-28-09:11:12 using SimpleDateFormat
I am using this simple date format SimpleDateFormat sdf = new SimpleDateFormat(yyyy-MM-dd HH:mm:ss.SSS Z);
I am using this code to parse a Date. SimpleDateFormat formatter = new SimpleDateFormat(MM/dd/yyyy);
Right now I am using this code Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf =
What is really meant when using Java Date utilities and something has been deprecated.
I'm using java.text.SimpleDateFormat to parse strings of the form yyyyMMdd . If I try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.