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 6761773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:13:54+00:00 2026-05-26T14:13:54+00:00

how to format 2011-10-25T13:00:00Z string into date and time i used simple date format

  • 0

how to format “2011-10-25T13:00:00Z” string into date and time

i used simple date format class

SimpleDateFormat sim=new SimpleDateFormat("yyyy-MM-dd");

but it only giving the date value. not time values

please help me to solve this problem

  • 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-05-26T14:13:55+00:00Added an answer on May 26, 2026 at 2:13 pm

    Use the format "yyyy-MM-dd'T'HH:mm:ss'Z'" for parsing this date format. See the documentation of SimpleDateFormat for more info. Code will look like this

    String dateStr = "2011-09-19T15:57:11Z";
    String pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'";
    Date date = new SimpleDateFormat(pattern).parse(dateStr);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to parse this date-time format 2011-12-02T16:18:12.479-05:00 into an mm/dd/yy
I've got a SimpleDateFormat to parse a String into a Date : SimpleDateFormat format
I have a date in this format 10/12/2011 12:55:00 PM (MM-DD-YYYY time) I would
i fetched from created field date and time like this format 2011-3-10 17:26:50 and
I have a (date time) stored in database in this format 2011-10-12 02:01:24 when
I have a date with String format 09-06-2011. I need to compare it with
I have the following date in string format 2011-29-01 12:00 am . Now I
I need to convert a date in this string format: 2011-01-12T14:17:55.043Z to a number
I know of date formats such as yyyy-mm-dd -which displays date in format 2011-02-26
I've a tab delimited log file that has date time in format '2011-07-20 11:34:52'

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.