Changing to British date form a US style (text) field

Ask a Question related to FileMaker, Design and Development.

  1. #1

    Default Changing to British date form a US style (text) field

    Hello all

    I have a document tracking database set up in FM Pro. One of the
    fields I use is a "Due Date" field which is scripted to add two days
    to the current date. Our printed product is required within two days
    of origination. Sometimes this needs to be an extra day or two as it
    may fall on a friday.

    As a result I have used a free calendar file which pops up and once a
    date is selected the result is placed in a global text field, I have
    scripted the the ok button in the calendar to place it on the
    clipboard. Then going back to my document tracking database I have
    inserted a button that pastes the result in the Due Date window.
    However it is in the US format (i.e. MM/DD/YY). What scripting actions
    can I use to change this back to British format (i.e. DD/MM/YY)?
    Remember the field is a text field seeing as it has been copied from a
    text field. Can I use a text command to swop the month with the date
    format? I have tried using date filed settings but I get an error
    warning asking me to Revert.

    Regards

    Royser
    Roy Keane Guest

  2. Similar Questions and Discussions

    1. Changing a Flash form field value
      I am new to Flash forms and AS. I have tried hunting down a solution but have not had any luck. I have a application that uses Flash remoting to...
    2. Anyone set caret size/style in text field ?
      How does one set a Caret of different style (say block) in a text field ? ANy help is appreciated.
    3. Converting a text field to a date field - FM6
      I need to convert a Text field containing both auto and manually entered dates over to a Date field. The records that were autoentered move over...
    4. Changing Style In Form
      I Know this should be simple but I stuck trying to change the style of my existing forms. At the moment its Expedition and I need it to be...
    5. Linking date field to text field entry
      Is there a way to setup a date field that will automatically enter the date when any information is entered into a field next to it?
  3. #2

    Default Re: Changing to British date form a US style (text) field

    Well,

    you can make a field named BRITISH DATE as calc field and the sentence will
    be:

    MiddleWords( US DATE; 2; 1) & "/" & LeftWords( US DATE; 1) & "/" &
    RightWords( US DATE; 1) and calculation result must be as TEXT.

    Sorry, maybe this is not a solution for your problem but... my Englsih is
    too bad.

    Regards,

    JC

    "Roy Keane" <royser@hotmail.com> escribió en el mensaje
    news:54780adb.0307212340.4e62a26b@posting.google.c om...
    > Hello all
    >
    > I have a document tracking database set up in FM Pro. One of the
    > fields I use is a "Due Date" field which is scripted to add two days
    > to the current date. Our printed product is required within two days
    > of origination. Sometimes this needs to be an extra day or two as it
    > may fall on a friday.
    >
    > As a result I have used a free calendar file which pops up and once a
    > date is selected the result is placed in a global text field, I have
    > scripted the the ok button in the calendar to place it on the
    > clipboard. Then going back to my document tracking database I have
    > inserted a button that pastes the result in the Due Date window.
    > However it is in the US format (i.e. MM/DD/YY). What scripting actions
    > can I use to change this back to British format (i.e. DD/MM/YY)?
    > Remember the field is a text field seeing as it has been copied from a
    > text field. Can I use a text command to swop the month with the date
    > format? I have tried using date filed settings but I get an error
    > warning asking me to Revert.
    >
    > Regards
    >
    > Royser

    JC Guest

  4. #3

    Default Re: Changing to British date form a US style (text) field

    This works for me

    Date (
    LeftWords ( Substitute ( USDate ; "/" ; " " ) ; 1 );
    MiddleWords ( Substitute ( USDate ; "/" ; " " ) ; 2 ; 1 ) ;
    RightWords ( Substitute ( USDate ; "/" ; " " ) ; 1 ) )
    james samuel Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139