Check today's date

I have a vacation database (Modified Version of the Sandbox database). Anyway, I want to have a view which shows who is off Today. So, I would need it to look at the StartDate and the EndDate and determine if today's date falls between these dates(Start and End inclusive)and that the document has the Status of Approved.
schmad01Asked:
Who is Participating?
 
qwaleteeCommented:
Oh, that one's easy, even formula lanugauge will do that:

viewName := ".....";
recipient := ".....";
columnNumber := 1;
query := @DbLookup("":"NoCache"; .ThisDatabase.; viewName; columnNumber);
value := @Implode(@Text(query));
@MailSend(recipient; ""; ""; "Vacationers today"; value)
0
 
madheeswarCommented:
@Today=CalendarDAtetime

Assuming you are using CalendarDAtetime field. or get a list of dates in between and use that field
0
 
schmad01Author Commented:
No, the 2 field names are StartDate and EndDate
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
madheeswarCommented:
@Today=(@TextToTime(@Text(StartDate) + "-" + @Text(EndDate)))

try that
0
 
HemanthaKumarCommented:
View selection formula should look like this..

Select @isMember( @text(@today); @text(@Explode( @TextToTime( @Text(start) + "-" + @Text(end) ) ) ) ) & Status = "Approved"

~Hemanth
0
 
schmad01Author Commented:
Ok, Heman that works.  Now, suppose I want to email the Receptionist once a day using an Agent to email a list from the usernames in column 1 of this view(Sorted)? How would I do that?  The view name is Today's Absent Employees.  Added 75 more pts. since this doesn't exactly pertain to the original question.
0
 
schmad01Author Commented:
Should I post the second part as a new question?
0
 
schmad01Author Commented:
I only want the agent to send 1 email at the scheduled time. I just did a test and it sent an email against every document in the view. That was 734 emails.
0
 
schmad01Author Commented:
To send just one document, I just made a dummy document and view with 1 saved document and just told the agent to act on that.  Works fine.  Thank you.
0
 
qwaleteeCommented:
You could have also set the agent to be just a "run once" agent, in which case, you would not need the dummy document and view.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.