Date format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dark223
    New Member
    • Oct 2008
    • 1

    Date format

    hi.

    i'm using a vb calendar to insert a date in a user form, but i can't set the date format to dd/mm/yy .

    for example:

    if i use:


    Text1.Text = Format(Text1.Te xt, "dd/mm/yyyy")

    to set the date format, if the date i choose is, for exemple, 15-out-2008, the output is correct, but if the day is below 12, for exemple, 9-out-2008, the output is out-09-2008.


    can anyone help please?
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Try to use Textbox.Format property.

    Regards,
    Fish

    Comment

    • hjozinovic
      New Member
      • Oct 2007
      • 167

      #3
      Originally posted by Dark223
      hi.

      i'm using a vb calendar to insert a date in a user form, but i can't set the date format to dd/mm/yy .

      for example:

      if i use:


      Text1.Text = Format(Text1.Te xt, "dd/mm/yyyy")

      to set the date format, if the date i choose is, for exemple, 15-out-2008, the output is correct, but if the day is below 12, for exemple, 9-out-2008, the output is out-09-2008.


      can anyone help please?
      A membere here had the same problem recently.
      He solved it by setting Local Date and time on his PC.
      Here is that post

      Comment

      Working...