You are currently reviewing an older revision of this page.
How do I change the date format used in Text Substitution to reflect MM/dd/yy?
I have two suggestions to obtain the desired format:
1. In Windows set the "Short date:" to "MM/dd/yy" under (Windows 10) Control Panel->Language, Select "Change date, time, or number format", select the "Format" tab, (Windows 7) Control Panel->Region and Language, 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 .dgnlibIn the MicroStation pulldown menus select Utilities->Named ExpressionsClick on the New IconEnter a name under the "Internal Name" and "External Names" fields. In this example I will use _DateOnly for both fieldsUnder "Keywords" select FileUnder "Symbol Sets", add System.string and System.DateTimeUnder Expression enterSystem.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 in MicroStation
https://communities.bentley.com/products/microstation/microstation_printing/w/wiki/13575/how-to-get-date-and-time-stamp-to-plot-using-a-single-microstation-pen-table-text-substitution-variable