This is probably a dumb question, but how do I define the date format when setting a variable value to %date% in a transition action?
I've been told that the date format on our rev table it not ideal. I cannot find where to change it. The rev table is populated from PDM work flow transition. The variable is set to data type = text so that tells me the format is defined when the date is converted to text clear back when the variable is set in the transition actions.
Thank you.
PDM, Where to set the format for %date% save in text variable?
PDM, Where to set the format for %date% save in text variable?
Each vault has a date format, right click the vault name in the administration tool and select "Properties"
Go to full post- jcapriotti
- Posts: 1852
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1196
- x 1984
Re: PDM, Where to set the format for %date% save in text variable?
Each vault has a date format, right click the vault name in the administration tool and select "Properties"
Jason
Re: PDM, Where to set the format for %date% save in text variable?
So there's only >one< place to set it?
That will be system wide there are other places where we sort by date and I fear it is text data type so it will sort for crap if I put it to what they're asking for MM-dd-yy. That's why I default my dates to yyyy-MM-dd when converting to text, so they sort!
In rev table there's no need to sort so it doesn't matter really, but if it's system wide... ugh.
That will be system wide there are other places where we sort by date and I fear it is text data type so it will sort for crap if I put it to what they're asking for MM-dd-yy. That's why I default my dates to yyyy-MM-dd when converting to text, so they sort!
In rev table there's no need to sort so it doesn't matter really, but if it's system wide... ugh.
- jcapriotti
- Posts: 1852
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1196
- x 1984
Re: PDM, Where to set the format for %date% save in text variable?
Well, I would think this would be universal for your company and you would want it the same everywhere but I get the need to have year first for sorting. Unfortunately I don't believe you can control it via the built in functions, it defaults to the vault format.
One potential solution is Dispatch. You can get date and time then format how you like and apply to a variable during a transition.
One potential solution is Dispatch. You can get date and time then format how you like and apply to a variable during a transition.
Jason
Re: PDM, Where to set the format for %date% save in text variable?
Thank you Jason. I'm going to see if what all is affected by that format, maybe I can just change it and be ok. It will be a mixed bag then as what's in the data card variables now won't change I assume.jcapriotti wrote: ↑Fri Apr 02, 2021 6:03 pm Well, I would think this would be universal for your company and you would want it the same everywhere but I get the need to have year first for sorting. Unfortunately I don't believe you can control it via the built in functions, it defaults to the vault format.
One potential solution is Dispatch. You can get date and time then format how you like and apply to a variable during a transition.
image.png
image.png
image.png
It's not that it would be different for different people, for example the variable is used on the revision table, but also as a column in the Contains and where used tabs for example (those just come to mind now) it's probable to sort by the revised date in that context, but not in the revision notes table on the drawing. I'm wondering now why a variable for storing a date was set up as Text instead of Date type.
I'm used to the year-month-date standard so I didn't see the problem I guess others think the month must be first...
- jcapriotti
- Posts: 1852
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1196
- x 1984
Re: PDM, Where to set the format for %date% save in text variable?
I would consult with your VAR on changing the format on an existing production vault, I've never done it. I'm assuming it just means dates are stored in the new format for new data only. Which may or may not cause an issue for you.....mostly when sorting dates and it's mixed. Some of the date searches where you use < some date might not work as expected.
Jason
Re: PDM, Where to set the format for %date% save in text variable?
To build on this, I will add that I've run into some issues with date formats and which interface of PDM sets the value (Client or Server). If the client has changed their date format to something other than the server, then I've seen their system format come through in custom property settings for the file. The server can still set default values according to it's date format, however I don't believe it will over-write or re-format the variables coming from the client side.jcapriotti wrote: ↑Fri Apr 02, 2021 6:45 pm I would consult with your VAR on changing the format on an existing production vault, I've never done it. I'm assuming it just means dates are stored in the new format for new data only. Which may or may not cause an issue for you.....mostly when sorting dates and it's mixed. Some of the date searches where you use < some date might not work as expected.
Re: PDM, Where to set the format for %date% save in text variable?
I don't think we'll be changing this. The more I dug into it the worse it looked to change the date. Just for clarity, we didn't want to change the format for different users. Rather, we would like to apply a format when the current date (%date%) is applied to a data card variable, so that the revised and approved dates in the drawing revision table would show up a certain way. When the vault was set up I did not realize that the system date format was for the entire system with no exceptions, and that changing it after going live could possibly cause big problems.AlexB wrote: ↑Fri May 07, 2021 9:54 am To build on this, I will add that I've run into some issues with date formats and which interface of PDM sets the value (Client or Server). If the client has changed their date format to something other than the server, then I've seen their system format come through in custom property settings for the file. The server can still set default values according to it's date format, however I don't believe it will over-write or re-format the variables coming from the client side.