Saturday, February 9, 2013

LIMSTime()

Like I mentioned with DOW() in a previous post, I had to figure out what day, time, and day of the week it was to send out different emails.

I used LIMSTime() to figure out time frames and then did simple checks.  For example:

SetAMPM(.T.); // this shows the AM/PM ending on time (or not) if desired.


Useful if I wanted to do things like:

time := LimsTime()
date := Today();
IF RIGHT(time,2)='AM';
     :IF LEFT(time,2) <'8';
etc., etc.

This would tell me if it was before 8 am, something very useful if I needed to fire off an email report.

or, perhaps:

:IF  LimsTime() > '4:30:00' .AND. LimsTime() < '0830:00' .AND. DOW(Today())=2;





.etc, etc.

This let me play with a time frame and say if it was before 8:30 and 4:30, do...


No comments:

Post a Comment