• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

TimeZone and/or DST settings

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's the returned string, the date is 11/14/2018...
 
Thomas Griffith
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Apparently the "1" isn't the first character in the returned string.

Is that single-quote character yours, or is it part of the returned string?



Oh, i see what you're saying. Let me System.out.println to stdout and see. i never put the single quote in.
 
Thomas Griffith
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, here is the result of this code...




stdout...
dt - 11/14/2018
dt_string - 11/14/2018

stderr...
java.time.format.DateTimeParseException: Text '11/14/2018' could not be parsed at index 0

So, actually, the line labeled -->Exception Here ->  is throwing the oarse exception. i hadn't noticed that. Do I need to establish the formatter for parsing a string to LocalDate?
 
Hang a left on main. Then read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic