当前位置:网站首页>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;
}
边栏推荐
- Memcached basics 11
- Oracle/PLSQL: CharToRowid Function
- Summer planning for the long river
- Hot discussion: what are you doing for a meaningless job with a monthly salary of 18000?
- Constraintlayout Development Guide
- Flink learning 5: how it works
- I earned 3W yuan a month from my sideline: the industry you despise really makes money!
- SQLite reader plug-in tests SQLite syntax
- D's appendto packaging
- 参数估计——《概率论及其数理统计》第七章学习报告(点估计)
猜你喜欢

宁愿去996也不要待业在家啦!24岁,失业7个月,比上班更惨的,是没班可上
在 IDEA 里看个书很过分嘛!

消费者追捧iPhone,在于它的性价比超越国产手机

lottie. JS creative switch button animal head

Parameter estimation -- Chapter 7 study report of probability theory and mathematical statistics (point estimation)

Hot discussion: what are you doing for a meaningless job with a monthly salary of 18000?

svg拖拽装扮Kitty猫

p5.js死亡星球

three.js多米诺骨牌js特效

1、项目准备与新建
随机推荐
为什么先划分训练集和测试集后归一化?
消费者追捧iPhone,在于它的性价比超越国产手机
Flink learning 3: data processing mode (stream batch)
h5液体动画js特效代码
别被洗脑了,这才是90%中国人的工资真相
Leetcode 785: judgment bipartite graph
WiFi-IoT 鸿蒙开发套件样例开发
three. JS domino JS special effect
Oracle/PLSQL: Upper Function
Oracle/PLSQL: From_ Tz function
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
Precautions for using sneakemake
Oracle/PLSQL: VSize Function
ConstraintLayout(约束布局)开发指南
Oracle/PLSQL: Soundex Function
Oracle/PLSQL: Translate Function
memcached基础12
Memcached basics 13
Dameng database installation
Flink Learning 2: Application Scenarios