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

      • <bdo id='U6anc'></bdo><ul id='U6anc'></ul>
    1. <tfoot id='U6anc'></tfoot>
    2. <legend id='U6anc'><style id='U6anc'><dir id='U6anc'><q id='U6anc'></q></dir></style></legend>

      1. <small id='U6anc'></small><noframes id='U6anc'>

        日期格式不起作用?

        DateFormat does not work?(日期格式不起作用?)
            <tfoot id='cXkhx'></tfoot>

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

              <legend id='cXkhx'><style id='cXkhx'><dir id='cXkhx'><q id='cXkhx'></q></dir></style></legend>

                  <tbody id='cXkhx'></tbody>
                • <bdo id='cXkhx'></bdo><ul id='cXkhx'></ul>

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

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

                  问题描述

                  String selectedDate = "2012-" + createdMonth + "-" + createdDay;
                  
                  SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
                  
                  try {
                      createdDate = dateFormat.parse(selectedDate);
                  } catch (ParseException e1) {
                      e1.printStackTrace();
                  }
                  
                  System.out.println(createdDate);
                  

                  基本上当我打印 createdDate 时,它会显示如下内容:2012 年 3 月 8 日星期四 00:00:00 CST

                  Basically when I print createdDate, it will display something like this : Thu Mar 08 00:00:00 CST 2012

                  而不是这种格式的yyyy-MM-dd".非常感谢!

                  Instead of something of this format "yyyy-MM-dd". Thanks a bunch!

                  推荐答案

                  parse 方法返回一个 java.util.Date,这就是 toString() 的 Date 实现返回.

                  The parse method returns a java.util.Date and that is the what the Date implementation of toString() returns.

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

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                    <bdo id='FcAPI'></bdo><ul id='FcAPI'></ul>
                    <i id='FcAPI'><tr id='FcAPI'><dt id='FcAPI'><q id='FcAPI'><span id='FcAPI'><b id='FcAPI'><form id='FcAPI'><ins id='FcAPI'></ins><ul id='FcAPI'></ul><sub id='FcAPI'></sub></form><legend id='FcAPI'></legend><bdo id='FcAPI'><pre id='FcAPI'><center id='FcAPI'></center></pre></bdo></b><th id='FcAPI'></th></span></q></dt></tr></i><div id='FcAPI'><tfoot id='FcAPI'></tfoot><dl id='FcAPI'><fieldset id='FcAPI'></fieldset></dl></div>

                    <legend id='FcAPI'><style id='FcAPI'><dir id='FcAPI'><q id='FcAPI'></q></dir></style></legend>

                        <tbody id='FcAPI'></tbody>

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

                        <tfoot id='FcAPI'></tfoot>