Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 May 6th, 2005, 06:00 AM
Authorized User
 
Join Date: Feb 2005
Location: hyderabad, Andhara Pradesh, India.
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ashokparchuri Send a message via Yahoo to ashokparchuri
Default Date Conversion

hi,

   how to convert a date into mm/dd/yyyy format when the date entered in (dd/mm/yyyy) format.

   thanks in advance-Ashok Parchuri
 
Old May 6th, 2005, 10:55 AM
Authorized User
 
Join Date: May 2005
Location: Kolkata, West Bengal, India.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to subhasis.chakraborty Send a message via Yahoo to subhasis.chakraborty
Default

Sir If u are using VB.NET for the purpose then I may help u out . Why dont u input the date in the mm/dd/yyyy format in the date time field and the when u are converting it to string just mention the format as the second parameter that is (dd/mm/yyyy) but in VB.NET mm stands for minutes so use MM for the following
 
Old May 31st, 2005, 01:26 AM
Friend of Wrox
 
Join Date: Sep 2004
Location: , , India.
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

public static string setDateDisplayFormat(DateTime _date)
{
strCulture = System.Globalization.CultureInfo.CurrentCulture.To String();
strShortDateFormat = "dd/MM/yyyy";
return (_date.ToString().Length>0?DateTime.Parse(_date.To String(),
    System.Globalization.CultureInfo.CreateSpecificCul ture(strCulture).DateTimeFormat).ToString(strShort DateFormat):"");
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
UNIX Date Conversion darrenb Access 4 March 11th, 2008 06:27 AM
Date conversion Issue dhay1999 Access 2 May 30th, 2007 06:47 AM
Date conversion AFK SQL Language 2 February 4th, 2005 05:14 PM
Date conversion lily611 General .NET 6 December 6th, 2004 12:41 AM
Conversion from string to date kshantik Access 2 May 19th, 2004 12:17 PM





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