DateTime ,DATE TO STRING ,STRING TO DATE
'' txtDateINPUT.Text- DATE TO STRING ,, STRING TO DATE -----------------------------
---------
Dim iDate As String = txtDateINPUT.Text
Dim oDate As DateTime = DateTime.ParseExact(iDate, "yyyyMMdd", Nothing)
MsgBox(Strings.Format(oDate, "yyyy/MM/dd")) '' ผลที่ไห้
---------
Dim iDate As String = lblDATE.Text
Dim oDate As DateTime = DateTime.ParseExact(iDate, "yyyyMMdd", Nothing)
---------
Dim str_date As String = "20121202"
Dim date_ As Date = DateTime.ParseExact(str_date, formatDATEss, _cultureEnInfo)
MsgBox(date_.ToString("yyyyMMdd", _cultureEnInfo)) '' ผลที่ไห้
---------
'' ใช้ได้ เลย
DateTime.ParseExact(STKJ03__.J03_MFGDATE, "ddMMyy", _cultureEnInfo).ToString("dd/MM/yyyy", _cultureEnInfo)
---------
Dim iDate As String = txtDateINPUT.Text
Dim oDate As DateTime = DateTime.ParseExact(iDate, "yyyyMMdd", Nothing)
MsgBox(Strings.Format(oDate, "yyyy/MM/dd")) '' ผลที่ไห้
---------
Dim iDate As String = lblDATE.Text
Dim oDate As DateTime = DateTime.ParseExact(iDate, "yyyyMMdd", Nothing)
---------
Dim str_date As String = "20121202"
Dim date_ As Date = DateTime.ParseExact(str_date, formatDATEss, _cultureEnInfo)
MsgBox(date_.ToString("yyyyMMdd", _cultureEnInfo)) '' ผลที่ไห้
---------
'' ใช้ได้ เลย
DateTime.ParseExact(STKJ03__.J03_MFGDATE, "ddMMyy", _cultureEnInfo).ToString("dd/MM/yyyy", _cultureEnInfo)
ไม่มีความคิดเห็น