%a- abbreviated weekday name.%A- full weekday name.%b- abbreviated month name.%B- full month name.%c- date and time, as "%a %b %e %H:%M:%S %Y".%d- zero-padded day of the month as a decimal number [01,31].%e- space-padded day of the month as a decimal number [ 1,31]; equivalent to%_d.%H- hour (24-hour clock) as a decimal number [00,23].%I- hour (12-hour clock) as a decimal number [01,12].%j- day of the year as a decimal number [001,366].%m- month as a decimal number [01,12].%M- minute as a decimal number [00,59].%L- milliseconds as a decimal number [000, 999].%p- either AM or PM.%S- second as a decimal number [00,61].%U- week number of the year (Sunday as the first day of the week) as a decimal number [00,53].%w- weekday as a decimal number [0(Sunday),6].%W- week number of the year (Monday as the first day of the week) as a decimal number [00,53].%x- date, as "%m/%d/%Y".%X- time, as "%H:%M:%S".%y- year without century as a decimal number [00,99].%Y- year with century as a decimal number.%Z- time zone offset, such as "-0700".%%- a literal "%" character.
format(Sys.time(), "%a %b %d %X %Y %Z") 结果为"周六 十一月 22 11:06:07 2014 CST" 我想让它显示为英文,而不是中文的周六,请问怎么弄?
本文介绍了日期格式化的原理及如何将中文日期转换为英文日期,适用于编程领域。
614

被折叠的 条评论
为什么被折叠?



