Date format in Calc
I want to put a date in a window title, fomatted at MM-DD-YY. The default here is MM/DD/YYYY. Is there a simple way to reformat a date string in a calc without breaking it up into pieces and then re-assembling it?
You could, but then it would it depend on the date format in use not changing - so assembling the the string from the date elements is a better solution.
Substitute ( Replace ( YourDate ; 7 ; 2 ; "" ) ;"/" ; "-" )
Okay. I ended up just creating this custom function to get a 2-digit year with padded days and months, for any date d:
Right ( "0" & Day ( d ) ; 2 ) & "-" &Right ( Year ( d ) ; 2 ) )
Retrieving data ...