23721Re: [Clip] Juggling the date
- Mar 24, 2013At 3/24/2013 09:57 PM, Adrian wrote:
>I've got myself into a muddle, yet I should be able to do this.
>I want, simply, any date (not today's date) as already given, as in:
>31/12/2005 (British version, month in the middle) to become 20051231
>In other words, the last four characters become the first four, the middle two numbers become the fifth and sixth and the first two numbers become the seventh and eighth numbers.
>This can be done for all such dates or just for the selected date by mouseover. The use of leading zeros is insisted upon first, as in 01/03/2013.
If you mean "mouseover" to be highlighted text then just set %srcdate% to ^$GetSelection$.
However you get the source, the actual conversion is a one liner [leading zeros are specified by the mm and dd masks).
;###### Start code
; %srcdate% = original date in British format dd/mm/yyyy
; %nbrdate% = converted date formatted: yyyymmdd
;###### End code
Info on $GetDateFromInt$ and $GetDateToInt$ is in the Clip help file (search for date)
Info on the Date and Time filter masks are in the Notetab help file (search for date)
- << Previous post in topic Next post in topic >>