weeks_since
Weeks since given date (truncated)
weeks_since(date)
Parameters
| Name | Type | Description |
|---|---|---|
date |
field | Date field to measure from, e.g. first_trade_date |
Formula
weeks_since = (scan_date - date) / 7
Examples
// Stocks that started trading within the last 26 weeks (~6 months)
weeks_since(first_trade_date) < 26;
// Stocks trading for more than 52 weeks (1 year)
weeks_since(first_trade_date) > 52;
Returns
int