如何将日期转换为格式“ddmmyyyy”

时间:2018-01-02 11:47:20

标签: r date

我有一个日期条目列表,我需要将每个日期格式转换为“DDMMYYYY”

示例:

a <- c("31 aug 1953", "1953", "aug 1953")

期望的输出:

"31081953", "00001953", "00081953"

1 个答案:

答案 0 :(得分:3)

由于格式不同,一个选项是<div class="grid-two imageandtext"> <div class="imageandtext image_grid"> <label for="selimg1"> <img src='https://i.imgur.com/0geAFQz.png' style="width:200px" /> </label> <input type="checkbox" name="selimg" id="selimg1"> <div class="caption"> </div> </div> <div class="grid-two imageandtext"> <div class="imageandtext image_grid"> <label for="selimg2"> <img src='https://i.imgur.com/0geAFQz.png' style="width:200px" /> </label> <input type="checkbox" name="selimg" id="selimg2"> <div class="caption"> </div> </div>进入&#39; day&#39;,&#39; month&#39;,&#39; year&#39;,然后{{ 1 {}在extract将{0}格式化为paste

的缺失值后
replace