This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Date Format

Hi

I am trying to change the date format and I did refer to the link https://community.m-files.com/forums-1552881334/f/m-files-clients/2540/date-format-change on the forum. I changed the regional settings but still no change. I used calculated value (VBScript) but the date still shows in a different format. Is there a way to show a different date format without changing the registry settings? Also can it be vault specific or its system wide

Parents Reply
  • Since you are already using scripts you can manipulate the date-string to your liking inside the script. You can use a simple rearrangement using something similar to what I did in this script:

    'partial script, reformatting a date to YYYY-mm-DD
    Dim szActivityDate : szActivityDate = PropertyValues.SearchForProperty( pdActivityDate ).TypedValue.DisplayValue
    Dim szYear : szYear = right(szActivityDate,4)
    Dim szMonth : szMonth = mid(szActivityDate,4,2)
    Dim szDay : szDay = left(szActivityDate,2)
    Output = szYear &"-"& szMonth &"-"& szDay

    You can also convert UTC to local time using something like this:

    Dim dCreated : dCreated = PropertyValues.SearchForProperty(20).TypedValue.GetValueAsTimeStamp().UtcToLocalTime().GetValue()

Children