[Info-vax] check date against an given age

Ken Fairfield ken.fairfield at gmail.com
Wed Nov 18 15:33:43 EST 2009


On Nov 18, 12:10 pm, Baxt... at tessco.com wrote:
[...]

> I'm kinda surprised that I haven't seen anyone mention the
> "Comparison" option in  f$cvtime()
>
> i.e.
>
> $ Time1 = f$cvtime("<first date/time>","Comparison",)
> $ Time2 = f$cvtime("<second date/time>","Comparison",)

I did...but it seems as if <some> of my posts haven't
escaped to the wild from the confines of Google Groups.
I see them, but others apparently don't. :-(   See if you
(or anyone? anyone?) can find my post from  Nov 11, 9:50 am.

> then  boolian comparison can be done
> $ If ( Time1 .les. Time2 ) then ...
>
> I would imagine that a variation on this could be used to provide the
> solution.

Yes.  The only "tricky" part, if you even consider it to
be tricky, is the format of the input dates.  I preferred to
apply a little F$Element to the problem, find the date
60 years earlier than TODAY, and then use COMPARISON
date format to make the call.  Pretty straight forward, eh?

   -Ken



More information about the Info-vax mailing list