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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:15:38+00:00 2026-06-11T02:15:38+00:00

I have the date in the string format like this Sat Sep 8 10:13:09

  • 0

I have the date in the string format like this “Sat Sep 8 10:13:09 GMT+0530 2012”, can anybody help me how to convert this string date in to Date class object.

  • 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-11T02:15:39+00:00Added an answer on June 11, 2026 at 2:15 am

    Try this code. Of course, I have modified as per your string, but you might have to modify the format little bit if it doesn’t work out.

    import java.util.*;
    import java.text.*;
    
    public class StringToDate {
        public static void main(String[] args){
            try{  
                String str_date="Sat Sep 8 10:13:09 GMT+0530 2012";
                DateFormat formatter ; 
                Date date ; 
                formatter = new SimpleDateFormat("EEE MMM d HH:mm:ss 'GMT'z yyyy");
                date = (Date)formatter.parse(str_date);  
                System.out.println("Today is " +date );
            } 
            catch (ParseException e){
                System.out.println("Exception :"+e);  
            }  
        }
    }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a date in String format, mm/dd/yyyy I want to convert this to
I have a date string which looks like this: Thu Feb 09 2012 01:50:00
I have a date/time string like this: 180510_112440 in this format ddmmyy_hhmmss I need
I have a string date like this: $date = 23/12/2011;//format: dd/mm/yyyy. I need each
I have a string in this format dd.mm.yy (23.08.10). I would like to convert
I have been passed a date string that looks like this: Thu%20Mar%2011%202010%2015%3A09%3A11%20GMT%2B0000%20(BST) I want
i have the date in a string format like so '11/2/2009' (m/d/yyyy) I need
Suppose I have date string like mydate = 24-Jun-2011; I want to convert it
In Python, how can I convert a string like this: Thu, 16 Dec 2010
I have date string in this format: 2009-07-15 00:00:00 - 2009-07-15 08:16:23 Could anyone

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.