快速业务通道

Java中一些获取当前日期的方法 - 编程入门网

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-06-14
conds fraction. However, trailing zeros, or two zero digits, are not displayed. FFF Displays the three most significant digits of the seconds fraction. However, trailing zeros, or three zero digits, are not displayed. FFFF Displays the four most significant digits of the seconds fraction. However, trailing zeros, or four zero digits, are not displayed. FFFFF Displays the five most significant digits of the seconds fraction. However, trailing zeros, or five zero digits, are not displayed. FFFFFF Displays the six most significant digits of the seconds fraction. However, trailing zeros, or six zero digits, are not displayed. FFFFFFF Displays the seven most significant digits of the seconds fraction. However, trailing zeros, or seven zero digits, are not displayed. gg The period or era. This pattern is ignored if the date to be formatted does not have an associated period or era string. h, %h The hour in a 12-hour clock. Single-digit hours do not have a leading zero. The application specifies "%h" if the format pattern is not combined with other format patterns. hh The hour in a 12-hour clock. Single-digit hours have a leading zero. H, %H The hour in a 24-hour clock. Single-digit hours do not have a leading zero. The application specifies "%H" if the format pattern is not combined with other format patterns. HH The hour in a 24-hour clock. Single-digit hours have a leading zero. K Different values of the Kind property, that is, Local, Utc, or Unspecified. m, %m The minute. Single-digit minutes do not have a leading zero. The application specifies "%m" if the format pattern is not combined with other format patterns. mm The minute. Single-digit minutes have a leading zero. M, %M The numeric month. Single-digit months do not have a leading zero. The application specifies "%M" if the format pattern is not combined with other format patterns. MM The numeric month. Single-digit months have a leading zero. MMM The abbreviated name of the month, as defined in AbbreviatedMonthNames. MMMM The full name of the month, as defined in MonthNames. s, %s The second. Single-digit seconds do not have a leading zero. The application specifies "%s" if the format pattern is not combined with other format patterns. ss The second. Single-digit seconds have a leading zero. t, %t The first character in the AM/PM designator defined in AMDesignator or PMDesignator, if any. The application specifies "%t" if the format pattern is not combined with other format patterns. tt The AM/PM designator defined in AMDesignator or PMDesignator, if any. Your application should use this format pattern for languages for which it is necessary to maintain the distinction between AM and PM. An example is Japanese, for which the AM and PM designators differ in the second character instead of the first character. y, %y The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号