如何将日期时间转换为数字 [英] how to convert date tme to numbers

查看:891
本文介绍了如何将日期时间转换为数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除日期之间的逗号特殊字符





示例日期= {15-12-2015 11:05 :05 AM}

i想要日期= 15122015110505AM

i want to delete the comma special character between a date


example date={15-12-2015 11:05:05 AM}
i want like date=15122015110505AM

推荐答案

您好,

根据您的要求试试这个下面的代码

Hello ,
As per your requirement try this below code
DateTime date= DateTime.Now;		
string format = "ddMMyyyhhmmsstt";		
Console.WriteLine(date.ToString(format));  



和O / P将是


and O/P will be

15122015063146AM

这篇关于如何将日期时间转换为数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆