Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Is there a way to get just the year from a date?
eric_pesty
Member Posts: 1,887 PRO
in Drawings
We would like to include the year in a title block note. There are various "dates" we have access to but I would like just the year part rather than the whole date...
Is there a way to get that somehow?
Is there a way to get that somehow?
0
Best Answer
-
eric_pesty Member Posts: 1,887 PRONath_McC said:I could be wrong, but I do not think you can do this. A little while ago I was looking for something similar but for a copyright date on a drawing template.
I did come up with a "hack" that will do for now: I used the "drawing drawn date", then I formatted it to yyyy-mm-dd, and used a small white rectangular images to hide the part I don't want. I structured things so a line return didn't look out of place after that.
I created an IR for this, feel free to vote!
https://forum.onshape.com/discussion/20692/custom-drawing-date-format-or-at-least-separate-year/p1?new=1
2
Answers
I did come up with a "hack" that will do for now: I used the "drawing drawn date", then I formatted it to yyyy-mm-dd, and used a small white rectangular images to hide the part I don't want. I structured things so a line return didn't look out of place after that.
I created an IR for this, feel free to vote!
https://forum.onshape.com/discussion/20692/custom-drawing-date-format-or-at-least-separate-year/p1?new=1
However I just had a thought: if you did it this way and updated the "default" value on January first every year, it would probably fill in the correct value automatically for every new drawing wouldn't it? That becomes fairly simple, just one single thing to update once a year...
Right now the way I have it setup it's "fully automatic" so that the nice part but it does make the formatting a bit of a challenge. If it bothers me too much and I get around to trying the property and default I'll report back!