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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:03:03+00:00 2026-05-15T09:03:03+00:00

DateTimeFormatter fmt = DateTimeFormat.forStyle(‘SS’).withLocale(locale) DateTime dt = fmt.parseDateTime(11/4/03 8:14 PM); the above statement will

  • 0

DateTimeFormatter fmt = DateTimeFormat.forStyle(‘SS’).withLocale(locale)
DateTime dt = fmt.parseDateTime(“11/4/03 8:14 PM”);

the above statement will parse the string correctly, and save as DateTime (Joda Time).

Now how to represent the beginning of a day. The below fails with
DateTime dt = fmt.parseDateTime(“11/4/03 00:01 AM”);

Cannot parse “11/4/03 00:01 AM”: Value 0 for clockhourOfHalfday must be in the range [1,12]

I’m obviously confused with the standards, like what is the short representation of the beginning of a day.

thanks.

  • 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-15T09:03:04+00:00Added an answer on May 15, 2026 at 9:03 am

    The beginning of the day is 12 AM not 00 AM, try your string with “11/4/03 12:01 AM”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code DateTimeFormatter formatter = DateTimeFormat.forPattern(dd-MMM-yyyy).withLocale(Locale.US); formatter.parseDateTime(10-23-2012); Why am I getting
String dateString = 20110706 1607; DateTimeFormatter dateStringFormat = DateTimeFormat.forPattern(YYYYMMDD HHMM); DateTime dateTime = dateStringFormat.parseDateTime(dateString);
I want to use joda to parse datetime strings in emails. Unfortunately I get
I have Date that look like String, and I want parse it. But date
I want to parse a DateTime using the joda library (in scala, but should
Does the style of the formatter in the parse method of the DateTime class
Is it possible to get the pattern string from a joda-time DateTimeFormatter? DateTimeFormatter formatter
I use jodatime to parse date time strings as follows: public static void main(String[]args){
I have a String 26/09/2012 07:30:00 is it possible to create a new DateTime
I have the following snippet that uses Joda time: import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; import

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.