Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2006, 05:41 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date Format Syntax

I want to display a date selected from a calendar control in a textbox with the following format:

             mmm/dd/yyyy

             Ex.) Aug 23, 2006


I have this right now:

txtDate.Text = Calendar1.SelectedDate.ToString()

-- displays 11/7/2006

What would the correct syntax be?


 
Old November 14th, 2006, 03:55 PM
Registered User
 
Join Date: Nov 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try the following:

txtDate.Text = Calendar1.SelectedDate.ToString("MMM dd, yyyy")






Similar Threads
Thread Thread Starter Forum Replies Last Post
date format differs, need to force format somehow patricolsson ASP.NET 2.0 Basics 1 December 3rd, 2009 12:53 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 03:17 PM
How to give Date format while entering date Subuana Beginning VB 6 4 March 17th, 2006 07:25 AM
Syntax Error on Date Range skwilliams Classic ASP Databases 4 February 13th, 2006 01:11 PM
date format differs, need to force format somehow patricolsson HTML Code Clinic 2 January 12th, 2006 05:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.