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

Re: More Date Function Bugs?

Expand Messages
  • ebbtidalflats
    Thanks for the replies, Dave & Diodem, I do have the three-part date argument working as well, but I interpreted the help differently. Given the use of the
    Message 1 of 5 , Apr 28, 2010
    • 0 Attachment
      Thanks for the replies, Dave & Diodem,

      I do have the three-part date argument working as well, but I interpreted the help differently. Given the use of the date mask, I expected the function to know which argument it needed, and which to discard. Guess I was wrong.


      --- In ntb-clips@yahoogroups.com, "diodeom" <diomir@...> wrote:
      >
      > ... ^$GetDateToInt()$ requires three values to perform its
      > calculation ...; no more, no less.
      > ...


      It turned out that 6 lines of code achieved what I needed (the number of days from present to the date in the document).


      > I (occasionally) utilize this simple custom function, which -- after receiving a variable name in either "mmmm" or "mmm" format -- returns the desired number ("m") through ^$MonthNumber()$.
      >
      > (In a parent clip:)
      > ^$MonthNumber(Apr)$
      >
      > H="MonthNumber"
      > ;long line start
      > ^!Result ^$Calc((^$StrPos("^$StrCopyLeft("^&";3)$";"JanFebMarAprMayJunJulAugSepOctNovDec";0)$+2)/3)$
      > ;long line end
      >

      Very nice. More compact than what I used.




      Cheers,


      Eb
    Your message has been successfully submitted and would be delivered to recipients shortly.