`
Gene
  • 浏览: 50598 次
社区版块
存档分类
最新评论

Date and Time format string

    博客分类:
  • Ruby
阅读更多
Specifier  Description
%Y         Year (four digits)
%y         Year (last two digits)
%b,        %B Short month, full month
%m         Month (number)
%d         Day of month (left-padded with zeros)
%e         Day of month (left-padded with blanks)
%a,        %A Short day name, full day name
%H,        %I Hour (24-hour clock), hour (12-hour clock)
%M         Minute
%S         Second
%c         Equivalent to "%a %b %d %H:%M:%S %Y"
%x         Equivalent to "%m/%d/%y"
分享到:
评论

相关推荐

    format_date_time_format_date_Time_vb6_

    makes an date_time_string for saving files

    date-time-format:日期时间格式

    $ npm install date-time-string 或者 < script src =" http://lightspeedworks.github.io/date-time-string/lib/date-time.js " > </ script > 用法: 简单的功能 var DateTime = require ( 'date-...

    Mysql 日期时间 DATE_FORMAT(date,format)

    本文转自:http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function_date-format DATE_FORMAT(date,format) Formats the date value according to the format string. The following ...

    桌面时钟显示软件(实用)

    A digital clock that displays date and time information built from the format string DS Clock is a free digital desktop clock that displays variable date and time information built from the format ...

    java DATE与时间戳互化

    String d = format.format(time); Date date=format.parse(d); System.out.println("Format To String(Date):"+d); System.out.println("Format To Date:"+date); 运行结果: Format To String(Date):...

    Datastage Parallel Job Functions.doc

    增加函数格式说明DateToString,DecimalToDecimal <br> Format String Date, Time, and Timestamp functions that take a format string (e.g. timetostring(time, stringformat)) need specific formats....

    java时间格式大全(算法源码)

    String dateString = formatter.format(dateDate); return dateString; } /** * 将短时间格式时间转换为字符串 yyyy-MM-dd * * @param dateDate * @param k * @return */ public static String dateToStr...

    PHP日期函数date格式化UNIX时间的方法

    string date (string $Format, int $Time); 下面是演示代码 <?php echo When this page was loaded,\n; echo 'It was then ', date ('r'), \n; echo 'The currend date was ', date ('F j,

    基于bootstrap双日期选择插件

    `format`: (string) date/time格式 `separator`: (string) 分隔符 `locale`: (object) 本地设置 dateLimit: { months: 3 }, 时间范围 `singleDatePicker`: (boolean) 是否是单个时间选择器 `parentEl`: ...

    java时间处理工具类--DateUtils

    /** * @(#)DateUtil.java * ... public static Date strToDate(String dateStr, String format) { Date date = null; if (dateStr != null && (!dateStr.equals(""))) { DateFormat df ...

    JAVA时间处理类

    public static Date stringToFormatDate(String date, String formmat) { try{ return getFormatter(formmat).parse(date); }catch(Exception e){ return null; } } /** * 日付の正確性チェック * *...

    DateUtils.java 日期处理相关工具类

    public static long dateToUnixTimestamp(String date, String dateFormat) { long timestamp = 0; try { timestamp = new SimpleDateFormat(dateFormat).parse(date).getTime(); } catch (ParseException...

    日期操作类 java

    public static final String LONG_TIME_FORMAT = "HH:mm:ss"; //格式:年-月 public static final String MONTG_DATE_FORMAT = "yyyy-MM"; // 年的加减 public static final int SUB_YEAR = Calendar.YEAR; ...

    nor-date:Node.js 的日期助手

    nor_date.format ( {string}format, {Date}timestamp, {object}opts ) 该函数将timestamp ——它是 Date 的一个实例——格式化为字符串format选项指定的format 。 如果time是中省略当前的时间将被使用。 所有参数都...

    DFT的matlab源代码-goutil:goutil常用帮助方法

    FORMAT_DATE_TIME string = "2006-01-02 15:04:05" const FORMAT_TIME string = "15:04:05" func CheckParents(aph string) func FCopy(src string, dst string) error func FWrite(path string, data []byte) error...

    Raize.Components-v6.1.12 FullSource(2009-XE8) Part1/2

    the Format property to the desired format string. RzDBList.pas * Surface the Sorted property in TRzDBListBox. RzEdit.pas * Fixed issue in TRzEdit and descendants where registered style hook was ...

    Raize.Components-v6.1.12 FullSource(2009-XE8) Part2/2

    the Format property to the desired format string. RzDBList.pas * Surface the Sorted property in TRzDBListBox. RzEdit.pas * Fixed issue in TRzEdit and descendants where registered style hook was ...

    Beginning.JavaScript.5th.Edition

    Chapter 7: Date, Time, And Timers Chapter 8: Programming The Browser Chapter 9: Dom Scripting Chapter 10: Events Chapter 11: Html Forms: Interacting With The User Chapter 12: Json Chapter 13: Data ...

    OutlookAttachView v2.73

    o Added option to specify a custom date/time format for the filename in the 'Copy Selected Files To...' option, for example: %msgdate:yyyyMMdd% , %msgtime:HHmmss% * Version 1.67 o ...

    java时间处理工具类--CalendarUtil(java源码)

    .format(getFirstDateByWeek(new Date()))); System.out.println("Last day of week is : " + new SimpleDateFormat("yyyy-MM-dd") .format(getLastDateByWeek(new Date()))); System.out....

Global site tag (gtag.js) - Google Analytics