---
schema_version: "1"
id: d14b42c96e434ed87000359262040434a4d621ade7765378fcafd0211b37c65f
title: now()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/concept/bi-saql-functions-timezone-now.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-now.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6c496c7a3438e7993e8fa9dd33408774f65e96c4bf5f60282d1d7b01ae2d597d
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# now()

Returns current datetime in the specified time zone. This function is valid only in a `foreach` statement.

Display the number of days an account is opened.

```nolang
q = foreach q generate Account, daysBetween('OrderDate', now()) as "daysOpened";
```

**See Also**

- [now()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/reference/bi-saql-functions-date-now.md)
