zoukankan      html  css  js  c++  java
  • Date Formatting in Reporting Services list of format codes

    Date Formatting in Reporting Services - list of format codes

    The Date Formatting article that I wrote earlier seems to be quite popular. As a follow up to that , I stumbled accross the full list of date formatting patterns on MSDN. I haven't had a chance to try out them all , but here it is :

    Format Pattern Description
    d The day of the month. Single-digit days will not have a leading zero.
    dd The day of the month. Single-digit days will have a leading zero.
    ddd The abbreviated name of the day of the week, as defined in AbbreviatedDayNames
    dddd The full name of the day of the week, as defined in DayNamesTD>
    M The numeric month. Single-digit months will not have a leading zero.
    MM The numeric month. Single-digit months will 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.
    y The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero.
    yy The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero.
    yyyy The year in four digits, including the century.
    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 The hour in a 12-hour clock. Single-digit hours will not have a leading zero.
    hh The hour in a 12-hour clock. Single-digit hours will have a leading zero.
    H The hour in a 24-hour clock. Single-digit hours will not have a leading zero.
    HH The hour in a 24-hour clock. Single-digit hours will have a leading zero.
    m The minute. Single-digit minutes will not have a leading zero.
    mm The minute. Single-digit minutes will have a leading zero.
    s The second. Single-digit seconds will not have a leading zero.
    ss The second. Single-digit seconds will have a leading zero.
    f The fraction of a second in single-digit precision. The remaining digits are truncated.
    ff The fraction of a second in double-digit precision. The remaining digits are truncated.
    fff The fraction of a second in three-digit precision. The remaining digits are truncated.
    ffff The fraction of a second in four-digit precision. The remaining digits are truncated.
    fffff The fraction of a second in five-digit precision. The remaining digits are truncated.
    ffffff The fraction of a second in six-digit precision. The remaining digits are truncated.
    fffffff The fraction of a second in seven-digit precision. The remaining digits are truncated.
    t The first character in the AM/PM designator defined in AMDesignator or PMDesignator, if any.
    tt The AM/PM designator defined in AMDesignator or PMDesignator, if any.
    z The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will not have a leading zero. For example, Pacific Standard Time is "-8".
    zz The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will have a leading zero. For example, Pacific Standard Time is "-08".
    zzz The full time zone offset ("+" or "-" followed by the hour and minutes). Single-digit hours and minutes will have leading zeros. For example, Pacific Standard Time is "-08:00".
    : The default time separator defined in TimeSeparator.
    / The default date separator defined in DateSeparator.
    % c Where c is a format pattern if used alone. The "%" character can be omitted if the format pattern is combined with literal characters or other format patterns.
    \ c Where c is any character. Displays the character literally. To display the backslash character, use "\\".
     
    From:  http://thavash.spaces.live.com/blog/cns!CF6232111374DFD2!197.entry
  • 相关阅读:
    从零入门 Serverless | 教你 7 步快速构建 GitLab 持续集成环境
    4 个场景揭秘,如何低成本让容器化应用 Serverless 化?
    如何无缝迁移 SpringCloud/Dubbo 应用到 Serverless 架构
    精准容量、秒级弹性,压测工具 + SAE 方案如何完美突破传统大促难关?
    golang 实现最小二乘法拟合直线
    golang 实现两数组对应元素相除
    js 算数组平均值、最大值、最小值、偏差、标准差、中位数、数组从小打大排序、上四分位数、下四分位数
    ajax传数组后台GO语言接收
    python 画图中文显示问题
    python stats画正态分布、指数分布、对数正态分布的QQ图
  • 原文地址:https://www.cnblogs.com/emanlee/p/1430223.html
Copyright © 2011-2022 走看看