Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Juggling the date

Expand Messages
  • Axel Berger
    ... It ought to. Art has left it to you to set and use the variables as needed. I guess you failed to do so. Without that his conversion has nothing to go on.
    Message 1 of 8 , Mar 25, 2013
    View Source
    • 0 Attachment
      Adrian Worsfold wrote:
      > This does not seem to work (well it doesn't)

      It ought to. Art has left it to you to set and use the variables as
      needed. I guess you failed to do so. Without that his conversion has
      nothing to go on.

      Axel
    • flo.gehrke
      ... The square brackets in that code are causing a syntax error -- without them it works: ^!Set
      Message 2 of 8 , Mar 25, 2013
      View Source
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, Art Kocsis <artkns@...> wrote:
        >
        > ^!Set %nbrdate%=^$GetDateFromInt(^$GetDateToInt[(^%srcdate%;dd/mm/yyyy)]$;yyyymmdd)$

        The square brackets in that code are causing a syntax error -- without them it works:

        ^!Set %nbrdate%=^$GetDateFromInt(^$GetDateToInt(^%srcdate%;dd/mm/yyyy)$;yyyymmdd)$

        Flo
      • Art Kocsis
        ... That s because it was a test. It gave you an opportunity to look up the correct syntax in the help file (I told you where), remove the offending brackets
        Message 3 of 8 , Mar 25, 2013
        View Source
        • 0 Attachment
          At 3/24/2013 11:50 PM, you wrote:
          >Hello
          >This does not seem to work (well it doesn't)
          >
          >;###### Start code
          >; %srcdate% = original date in British format dd/mm/yyyy
          >; %nbrdate% = converted date formatted: yyyymmdd
          >^!Set %nbrdate%=^$GetDateFromInt(^$GetDateToInt[(^%srcdate%;dd/mm/yyyy)]$;yyyymmdd)$
          >;###### End code
          >Adrian Worsfold

          That's because it was a test. It gave you an opportunity to look up the correct syntax in the help file (I told you where), remove the offending brackets and witness an elegant one line solution that handles your entire problem.

          Yeah, that sounds good.

          Much better sounding than saying I forgot to remove the brackets after my paste and didn't test it before posting. Nah, I wouldn't do that. That doesn't sound good at all! ;-)

          Art
        • Adrian Worsfold
          Hello all So what did I do with this assistance? It s all about looking for jobs using the new British Government website,
          Message 4 of 8 , Mar 25, 2013
          View Source
          • 0 Attachment
            Hello all

            So what did I do with this assistance?

            It's all about looking for jobs using the new British Government website, https://jobsearch.direct.gov.uk/register.aspx, where the Paste Board and then bunching together the information for each viewed vacancy causes a list of date, job title and area, the URL of details and why it cannot be applied for if not. I use this a lot, to bunch together details.

            ^!Replace "^p^p" >> "^p" [HAS]
            ^!Keyboard CTRL+J

            So it produces a list...

            First clip of recent assistance sets applications for jobs in date order and below any that begin 'FULL APPLICATION' if such was made because a y is after all but z words!


            ^!If ^$GetSelSize$ > 3 SKIP
            ^!Select ALL
            ^!Replace "\b(\d{2})/(\d{2})/(\d{4})\b" >> "y:$3 m:$2 d:$1" HRASTI
            ^!Menu Modify/Lines/Sort/Ascending
            ^!Clip "Asterisks remove 3 all"
            ^!Jump DOC_START
            ^!DeleteLine
            ^!DeleteLine

            The second clip restores the old dates once it is all sorted. I prefer to have two clips to see what is going on.

            ^!If ^$GetSelSize$ > 3 SKIP
            ^!Select ALL
            ^!Replace "y:\b(\d{4}) m:(\d{2}) d:(\d{2})\b" >> "$3/$2/$1" HRASTI
            ^!Jump DOC_START

            Incidentally the ^!Clip "Asterisks remove 3 all" goes to this:

            :LOOP
            ^!Replace "***" >> "" [WAS]
            ^!IfError END
            ^!GoTo LOOP
            :END
            ^!Clip "Tabs remove"
            ^!Clip "Paras regularise"
            ^!Keyboard CTRL+END

            Thus removing Paste Board dividers set at ***

            and the ^!Clip "Paras regularise" is as below to force even paragraphs.

            ^!SetScreenUpdate Off

            ^!Replace "^P " >> "^P" WAS
            ^!IfError Next else Skip_-2

            ^!Replace " ^P" >> "^P" WAS
            ^!IfError Next else Skip_-2

            ^!Replace " " >> " " WAS
            ^!IfError Next else Skip_-2

            ^!Replace "^P" >> "^P^P" WAS

            ^!Replace "^P^P^P" >> "^P^P" WAS
            ^!IfError Next else Skip_-2

            ^!SetScreenUpdate On





            Adrian Worsfold

            http://www.pluralist.co.uk
            http://pluralistspeaks.blogspot.com
            pluralist@...
            25-03-2013
            ----- Received the following content -----
            From: Axel Berger
            Receiver: ntb-clips
            Time: 2013-03-25, 07:02:22
            Subject: Re: [Clip] Juggling the date


            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.