Connecting Tech Pros Worldwide Forums | Help | Site Map

Convert Short date to Long date

OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 361
#1: May 19 '09
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. ?

OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 361
#2: May 19 '09

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
lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532
#3: May 22 '09

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
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 361
#4: May 25 '09

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
Newbie
 
Join Date: Mar 2008
Posts: 1
#5: Jun 18 '09

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
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 361
#6: Jun 24 '09

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