Click to See Complete Forum and Search --> : Date conversion..Urgent
venkatraman_r
Jan 12th, 2000, 04:35 PM
Hi all,
in my text box the user enters a date value, normally, it could be
5-5-99.
i need it to be changed to 05/05/99..how do i do it..
Urgent..Answer ASAP.
Thanx.
Venkat.
------------------
venkatraman_r@hotmail.com
ICQ: 45714766
http://venkat.iscool.net
R@emdonck
Jan 12th, 2000, 04:42 PM
Hi,
You can use the format function.
example
dim MyDate
Mydate = Now()
Mydate = Format(MyDate, "dd/mm/yy")
Msgbox MyDate
R@emdonck
venkatraman_r
Jan 12th, 2000, 05:02 PM
Thanx..but it does not formats the date "5/5/99" to "05/05/99"
Any alternates.
------------------
venkatraman_r@hotmail.com
ICQ: 45714766
http://venkat.iscool.net
Mark Sreeves
Jan 12th, 2000, 08:46 PM
Venkat
why are all your questions Urgent..Answer ASAP?
You must be very stressed!
debug.print Format("5-5-99", "dd/mm/yy")
the date format functions are dependant on the Regional settings so your output may be different to other peoples
------------------
Mark Sreeves
Analyst Programmer
Mark.Sreeves@Softlab.co.uk
A BMW Group Company
R@emdonck
Jan 13th, 2000, 01:22 AM
Hi,
What Mark wrote is true, because the code works on my PC.
My regional setting for short date = "d/MM/yy"
See ya
venkatraman_r
Jan 13th, 2000, 11:58 AM
Hi Mark,
thats true..I used vb-world not only to learn but also as a helper to my project....My project leader is kinda person who is more concentrated in punctuality in finishing the work..If i do not get the thing done within the time, GOD..I will be sacked out..
Thanx man and thanx to R@emdonck.
Regards,
Venkat.
------------------
venkatraman_r@hotmail.com
ICQ: 45714766
http://venkat.iscool.net
LG
Jan 13th, 2000, 12:18 PM
Hi, there. This should work:
Format(MyDate, "DD/MM/yy")
Larisa
venkatraman_r
Jan 13th, 2000, 01:37 PM
Hi people,
thanks and it worked after chaning the format of date in the control panel..
regards,
venkat. :)
------------------
venkatraman_r@hotmail.com
ICQ: 45714766
http://venkat.iscool.net
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.