+ Reply to Thread
Results 1 to 6 of 6

Date as European

Hybrid View

  1. #1
    Registered User
    Join Date
    10-23-2006
    Posts
    84

    Date as European

    When entering the date from a form I have to enter as MM/DD/YY even though the sheet is formatted to English(Australian) I need it to be entered correctly as the date is used in a sort.

    Is there any way to code :- txtInvDate.Text = Cells(Cr ,5).value [The textbox input] so that it can be entered as DD/MM/YY?

    Also can it be error checked to make sure it's been entered in the correct format?

    I cannot use any formula on the sheet itself as the code checks for the next empty row and does not consider a row with a formula as empty.

  2. #2
    Forum Contributor
    Join Date
    08-02-2005
    Posts
    102
    Check your international settings which Excel will read first:

    Start/Settings/Control Panel/Date and Time AND Regional and Language Options. Get these two running properly and the rest should be OK.

  3. #3
    Registered User
    Join Date
    10-23-2006
    Posts
    84
    Sorry from Where? the Workbook itself or Exel properties or what?

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    My recommendation is to code as follows :
    txtFrom.Value = Format(DateSerial(Year(Date1.Value), Month(Date1.Value), Day(Date1.Value)), "Short Date")
    HTH
    Carim

  5. #5
    Registered User
    Join Date
    11-04-2006
    Posts
    19
    gogsJames - Jon Quixley means using the (Windows) Start Menu at the bottom left of the whole screen.

    press Ctrl + Escape now and it pops up. well it does for me.

    somewhere on that is the Control Panel and in that you will find:
    1) Date and Time
    2) Regional and Language Options

    mine are okay but I still get a similar problem on my form to the one you are having.
    Excel comes up with mm/dd/yyyy instead of the sensible dd/mm/yyyy.
    I blame the americans for not using the proper convention.

    Carim - personally I am not sure how to use your code. (I think I will post my problem on a different thread because it might not be completely the same problem.)

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    heinousanus,

    I am using this code to adjust to the European format dd.mm.yy the input provided by the Calendar object which produces mm.dd.yy ...

    HTH
    Carim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1