• <small id='4Et8u'></small><noframes id='4Et8u'>

    <legend id='4Et8u'><style id='4Et8u'><dir id='4Et8u'><q id='4Et8u'></q></dir></style></legend>
        <bdo id='4Et8u'></bdo><ul id='4Et8u'></ul>

    1. <tfoot id='4Et8u'></tfoot>

      1. <i id='4Et8u'><tr id='4Et8u'><dt id='4Et8u'><q id='4Et8u'><span id='4Et8u'><b id='4Et8u'><form id='4Et8u'><ins id='4Et8u'></ins><ul id='4Et8u'></ul><sub id='4Et8u'></sub></form><legend id='4Et8u'></legend><bdo id='4Et8u'><pre id='4Et8u'><center id='4Et8u'></center></pre></bdo></b><th id='4Et8u'></th></span></q></dt></tr></i><div id='4Et8u'><tfoot id='4Et8u'></tfoot><dl id='4Et8u'><fieldset id='4Et8u'></fieldset></dl></div>

        Java 日期格式

        时间:2023-06-28
          <bdo id='Nqjhq'></bdo><ul id='Nqjhq'></ul>

        • <legend id='Nqjhq'><style id='Nqjhq'><dir id='Nqjhq'><q id='Nqjhq'></q></dir></style></legend>
            1. <i id='Nqjhq'><tr id='Nqjhq'><dt id='Nqjhq'><q id='Nqjhq'><span id='Nqjhq'><b id='Nqjhq'><form id='Nqjhq'><ins id='Nqjhq'></ins><ul id='Nqjhq'></ul><sub id='Nqjhq'></sub></form><legend id='Nqjhq'></legend><bdo id='Nqjhq'><pre id='Nqjhq'><center id='Nqjhq'></center></pre></bdo></b><th id='Nqjhq'></th></span></q></dt></tr></i><div id='Nqjhq'><tfoot id='Nqjhq'></tfoot><dl id='Nqjhq'><fieldset id='Nqjhq'></fieldset></dl></div>

                  <tbody id='Nqjhq'></tbody>

                <tfoot id='Nqjhq'></tfoot>

                <small id='Nqjhq'></small><noframes id='Nqjhq'>

                  本文介绍了Java 日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有 String str "May 23 2011 12:20:00",想把它转换成这样的日期:

                  Have String str "May 23 2011 12:20:00", want to convert it to date such this:

                  Date date = (new SimpleDateFormat("MMM dd yyyy HH:mm:ss")).parse(str);
                  

                  它总是给我 ParseException Unparsable 日期格式:'May 23 2011 12:20:00'.

                  It always gives me ParseException Unparsable date format: 'May 23 2011 12:20:00'.

                  寻找类似的问题,似乎一切正常.

                  Looked for similar issues, seems everything right.

                  怎么了?

                  推荐答案

                  当您的 VM 的默认语言环境不是英文时,您可能需要额外指定 Locale:

                  You may need to additionally specify the Locale, when the default Locale of your VM is not an English one:

                  Date date = (new SimpleDateFormat("MMM dd yyyy HH:mm:ss", Locale.US)).parse(str);
                  

                  这篇关于Java 日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 Mule 发送格式化邮件 下一篇:按列打印 Java 数组

                  相关文章

                • <i id='AYrTq'><tr id='AYrTq'><dt id='AYrTq'><q id='AYrTq'><span id='AYrTq'><b id='AYrTq'><form id='AYrTq'><ins id='AYrTq'></ins><ul id='AYrTq'></ul><sub id='AYrTq'></sub></form><legend id='AYrTq'></legend><bdo id='AYrTq'><pre id='AYrTq'><center id='AYrTq'></center></pre></bdo></b><th id='AYrTq'></th></span></q></dt></tr></i><div id='AYrTq'><tfoot id='AYrTq'></tfoot><dl id='AYrTq'><fieldset id='AYrTq'></fieldset></dl></div>
                    1. <tfoot id='AYrTq'></tfoot>
                      <legend id='AYrTq'><style id='AYrTq'><dir id='AYrTq'><q id='AYrTq'></q></dir></style></legend>
                        <bdo id='AYrTq'></bdo><ul id='AYrTq'></ul>
                    2. <small id='AYrTq'></small><noframes id='AYrTq'>