如何将字符串数据转换为日期格式 [英] How to convert string data to date format
本文介绍了如何将字符串数据转换为日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
日期存储在字符串类型的变量strdate中.
如何隐藏strdate到date格式.
比你
vinay gowda
hello
date is stored in string type variable strdate.
how to covert strdate to date format.
than you
vinay gowda
推荐答案
尝试DateTime.TryParse
^ ]或DateTime.TryParseExact
[
Try theDateTime.TryParse
[^] orDateTime.TryParseExact
[^] methods.
Dim convertedDate As Date = Date.Parse(strdate)
请参阅以下链接:
http://www.developerfusion.com/code/3244 /how-to-convert-a-string-to-a-date/ [
Refer this link:
http://www.developerfusion.com/code/3244/how-to-convert-a-string-to-a-date/[^]
这篇关于如何将字符串数据转换为日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文