Results 1 to 8 of 8

Thread: Date conversion..Urgent

  1. #1

    Thread Starter
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    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.

    ------------------
    [email protected]
    ICQ: 45714766
    http://venkat.iscool.net

  2. #2
    Lively Member
    Join Date
    Nov 1999
    Location
    Belgium
    Posts
    98

    Post

    Hi,

    You can use the format function.

    example

    dim MyDate

    Mydate = Now()
    Mydate = Format(MyDate, "dd/mm/yy")
    Msgbox MyDate

    R@emdonck

  3. #3

    Thread Starter
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    Thanx..but it does not formats the date "5/5/99" to "05/05/99"

    Any alternates.

    ------------------
    [email protected]
    ICQ: 45714766
    http://venkat.iscool.net

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    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

    [email protected]
    A BMW Group Company

  5. #5
    Lively Member
    Join Date
    Nov 1999
    Location
    Belgium
    Posts
    98

    Post

    Hi,

    What Mark wrote is true, because the code works on my PC.

    My regional setting for short date = "d/MM/yy"

    See ya

  6. #6

    Thread Starter
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    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.

    ------------------
    [email protected]
    ICQ: 45714766
    http://venkat.iscool.net

  7. #7
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    Hi, there. This should work:

    Format(MyDate, "DD/MM/yy")

    Larisa


  8. #8

    Thread Starter
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    Hi people,

    thanks and it worked after chaning the format of date in the control panel..

    regards,

    venkat.

    ------------------
    [email protected]
    ICQ: 45714766
    http://venkat.iscool.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width