|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Date formating a Textbox in VB.NET
Help!
I bounded textboxes to as MS Acsess dataset in code, but the dates are displayed in the format 12/06/1966 00:00:0. What I want to display is just the date part (12/06/1966). I dont need the time part. How do I format the textbox? 99pshop |
|
#2
|
|||
|
|||
|
If you cast the date as a datetime datatype first, you can then use its methods to format your date. Something like:
' replace string value with your dataset value dim MyDate as DateTime = "12/06/1966 00:00:0" txtMyDate.Text = MyDate.ToString("mm/dd/yyyy") You can also still use the old VB Format() function. HTH. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Date formating a Textbox in VB.NET |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|