.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 16th, 2005, 06:31 PM
99pshop 99pshop is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 2 99pshop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 59 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old April 15th, 2005, 02:05 AM
ZLA ZLA is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Saint Louis, MO
Posts: 13 ZLA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 46 m 37 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Date formating a Textbox in VB.NET


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap