472,125 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

Convert Short date to Long date

OuTCasT
374 256MB
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. ?
May 19 '09 #1
5 6395
OuTCasT
374 256MB
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
May 19 '09 #2
lee123
556 512MB
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
May 22 '09 #3
OuTCasT
374 256MB
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
May 25 '09 #4
@OuTCasT
Hi

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

rajput391@yahoo.com
Jun 18 '09 #5
OuTCasT
374 256MB
@rajput391

I cannot use that code because i am using Visual Studio Team Suite 2009 and not VB6
Jun 24 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Kevin Baker | last post: by
2 posts views Thread by Mike L | last post: by
9 posts views Thread by Simple Simon | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.