change date format from mm/dd/yy to yymmdd
How to change today format from mmyydd to yymmdd
thanks to all
IF this date is in a field of type date, you can select that field while in layout mode and use the Data formatting on the bottom of the Inspector's data tab to specify that format as a custom format.
This does not change the value in the field, only how it is displayed on this specific layout.
I found this thread and have the same question. I want to dispay the date in reverse YYMMDD but the option is MMDDYY only and not as I need. Alternatively, I need to remove the first 2 digits of the year in the following script step:
"Statement" & " " & Year (Get ( CurrentDate )) & Month (Get ( CurrentDate )) & Day (Get ( CurrentDate )) & " " & Invoices::Photographer initials & " " & Invoices::Agency & ".pdf"
Right(Year(Get(CurrentDate));2) & Right("00" & Month(Get(CurrentDate));2)
gives you: YYMM (with leading 0 in month to keep the values the same length)
I always use YYYYMMDD regardless of where this is used in the world. this is Alpha-sortable & also happens to be chronologically correct.
For the YYMMDD part, assuming also that you want preceding zeroes like "01" for January etc.:
Let( d = Get( CurrentDate ) ;
Right( Year( d ) ; 2 ) & Right( "00" & Month( d ) ; 2 ) & Right( "00" & Day( d ) ; 2 )
I always use Let( ) to avoid typing the same function several times.
By the way, I would avoid spaces in filenames, and check for punctuation and other weird characters, since operating systems may not like them. What if one of your agencies would have a name like "Laurel & Hardy Inc."? You never know if the ampersand and the extra period might behave well in a filename.
Just to clarify,
if you just need to display this date rather than use it as data, a custom date format can be set up using the methods of my original answer. You can get a displayed date of 161027 as the displayed date for October 27, 2016.
Thank you everyone - resolved
+44 (0)7866 500 792
Thanks - unfortately we've been using this systme for a very long time but I see you point.
no worries, perhaps it will help others...
p.s. please mark an answer as correct (even if your own comment), so others know the question was resolved!
I would do but can’t see Answered option - perhaps as it’s not my original question?
Only the person who posted the original question 4 years ago and when a different software system managed this forum, could mark the question as answered.
Ah yes! I see that this indeed is an old thread. I thought after so long question became "presumed answered". Thanks, Phil!
And as a note to an old post . . . Always use 4 digits for year. I mean why not?
Retrieving data ...