当前位置:网站首页>C # check whether the date is in the correct format
C # check whether the date is in the correct format
2022-06-27 02:11:00 【cqs_ jition】
/// <summary>
/// Judge whether the string time format is legal
/// </summary>
/// <param name="source"> String time </param>
/// <param name="format">yyyy-MM-dd or yyyy-MM-dd HH:mm:ss</param>
/// <returns></returns>
public bool IsValidDateTiem(string source,string format)
{
DateTime parsed;
bool valid = DateTime.TryParseExact(source, format, CultureInfo.InvariantCulture,
DateTimeStyles.None,
out parsed);
return valid;
}
边栏推荐
- Oracle/PLSQL: Length Function
- 企业数字化转型:信息化与数字化
- 我靠副业一个月挣了3W块:你看不起的行业,真的很挣钱!
- Oracle/PLSQL: Rtrim Function
- Installing the Damon database using the command line
- Consumers pursue the iPhone because its cost performance exceeds that of domestic mobile phones
- paddlepaddle 20 指数移动平均(ExponentialMovingAverage,EMA)的实现与使用(支持静态图与动态图)
- 别被洗脑了,这才是90%中国人的工资真相
- 为什么传递SPIF_SENDCHANGE标志SystemParametersInfo会挂起?
- mmdetection 用yolox训练自己的coco数据集
猜你喜欢

Browser cache

dat.gui.js星星圆圈轨迹动画js特效

Flink学习4:flink技术栈

SQLite Reader 插件测试SQLite语法

按键控制LED状态翻转

Flink learning 5: how it works

Cvpr2022 | pointdistiller: structured knowledge distillation for efficient and compact 3D detection
在 IDEA 里看个书很过分嘛!

ThreadLocal详解

Flink learning 3: data processing mode (stream batch)
随机推荐
Flink learning 2: application scenarios
Oracle/PLSQL: Ltrim Function
memcached基礎12
Oracle/PLSQL: VSize Function
perl语言中 fork()、exec()、waitpid() 、 $? >> 8 组合
paddlepaddle 19 动态修改模型的最后一层
Learn the most basic operation of discodiffusion
Don't be brainwashed. This is the truth about the wages of 90% of Chinese people
lottie.js创意开关按钮动物头像
Oracle/PLSQL: Replace Function
二叉樹oj題目
Oracle/PLSQL: Trim Function
Flink learning 3: data processing mode (stream batch)
Is the division of each capability domain of Dama, dcmm and other data management frameworks reasonable? Is there internal logic?
I earned 3W yuan a month from my sideline: the industry you despise really makes money!
mmdetection 用yolox训练自己的coco数据集
Detailed explanation of ThreadLocal
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
使用命令行安装达梦数据库
Oracle/PLSQL: Rtrim Function