How can I change the Date Format?

I have a problem, I am working with a border in which I have inserted the date of the system, they ask me to change the format, I do not know how to do it.

Thanks

Parents Reply
  • I have two suggestions to obtain the desired format:

    1. in Windows set the "Short Date" to MM/dd/yy" under Control Panel->Language, Select "Change date, time, or number format", select the "Format" tab. Make sure to restart MicroStation. By changing this option it affects any other application that uses the "Short date" format.

    2.Create a Named Expression and use the same in the Replacement field of the Text Substitution

    I will suggest you keep your named expressions in the same .dgnlib where you keep your print styles.

    Open your .dgnlib
    In the MicroStation pulldown menus select Utilities->Named Expressions
    Click on the New Icon
    Enter a name under the "Internal Name" and "External Names" fields. In this example I will use _DateOnly for both fields
    Under "Keywords" select File
    Under "Symbol Sets", add System.string and System.DateTime
    Under Expression enter
    System.String.Format ("{0:MM/dd/yy}", System.DateTime.Now())

    Verify what your replacement string will look like by clicking on Test

    Now edit your pen table and edit the entry you have for the date.
    In the Replacement field enter:
    <expr?name=_dateonly>
    if the name of the fields are different use "Internal Name"
    Save your pen table, your results should reflect the desired results in the date format

    You can access Help on Named Expressions by entering "Named Expressions Dialog" under Search

Children
No Data