Connecting Tech Pros Worldwide Help | Site Map

Convert Short date to Long date

  #1  
Old May 19th, 2009, 08:51 AM
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 347
Hi.
I would like to know how to convert the short date format to the long date format for my application without changing the regional settings from short date to long date. ?
  #2  
Old May 19th, 2009, 09:31 AM
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 347

re: Convert Short date to Long date


What i mean is
say the pc that the application is on, the pc's date is set to short date. so displaying 09/05/31 or 31/05/09
I need it to convert that to 2009/05/31 or 31/05/2009
  #3  
Old May 22nd, 2009, 05:43 AM
lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532

re: Convert Short date to Long date


hello,

you could try this:

Expand|Select|Wrap|Line Numbers
  1. YourTextbox.text=format$(Date,"YYYY/DD/MM")
  2.                              or
  3. YourTextbox.text=format$(Date,"DD/MM/YYYY")
lee123
  #4  
Old May 25th, 2009, 07:02 AM
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 347

re: Convert Short date to Long date


Hi Lee123

I resolved it with

Expand|Select|Wrap|Line Numbers
  1. lblDate.Text = dtFirstPayDate.DateTime.ToString("yyyy/MM/dd")
Same method as u suggested.

Thanks
OuTCasT
  #5  
Old June 18th, 2009, 07:12 AM
Newbie
 
Join Date: Mar 2008
Posts: 1

re: Convert Short date to Long date


Quote:
Originally Posted by OuTCasT View Post
Hi.
I would like to know how to convert the short date format to the long date format for my application without changing the regional settings from short date to long date. ?
Hi

i am ISHTIAQ
PLS. USE THIS CODE
LBLDATE.CAPTION=Format$(Date,"YYYY/DD/MM")

rajput391@yahoo.com
  #6  
Old June 24th, 2009, 10:40 AM
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 347

re: Convert Short date to Long date


Quote:
Originally Posted by rajput391 View Post
Hi

i am ISHTIAQ
PLS. USE THIS CODE
LBLDATE.CAPTION=Format$(Date,"YYYY/DD/MM")

rajput391@yahoo.com

I cannot use that code because i am using Visual Studio Team Suite 2009 and not VB6
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning a short date in a datareader axapta answers 7 June 27th, 2008 09:18 PM
Convert a column from "Short Date" to "Long Date" Curious answers 0 May 25th, 2007 03:25 PM
Short date to long date Mike L answers 2 November 17th, 2005 06:15 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit answers 0 November 14th, 2005 10:15 AM