# RB function help
**Category:** [Yahoo Archive](https://www.epiusers.help/c/yahoo-archive/9)
**Created:** 2000-08-25 14:25 UTC
**Views:** 381
**Replies:** 0
**URL:** https://www.epiusers.help/t/rb-function-help/930
---
## Post #1 by @system
I wrote a function called 'Yesterday' that's quite simple: TODAY()
-1. I use this to print a list of yesterday's shipments. Of course, the
obvious problem for a five-day-a-week company like ours is that, when you
run it on Monday, you always return 0 records. Has someone written a
function that returns TODAY()-3 when it's Monday, TODAY()-2 on Sunday, and
TODAY()-1 every other day?
Kenneth E. Urban
Manager, Information Systems & Technology
Major Industries, Inc.
7120 Stewart Avenue
Wausau, WI 54401
(715) 842-4616 voice
kurban@...
---
**Canonical:** https://www.epiusers.help/t/rb-function-help/930
**Original content:** https://www.epiusers.help/t/rb-function-help/930