Skip to content

Commit 2a6a049

Browse files
committed
adding advanced date and time usage in assistant dynamic variables
1 parent 1cfa319 commit 2a6a049

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

assistants/dynamic-variables.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,13 @@ meaning that you don't need to set them manually in `variableValues`:
6464
| `{{year}}` | Current year (UTC) | 2024 |
6565

6666
**Note:** You will need to add the `{{variableName}}` in this format in all your prompts, whether it is the first message or anywhere else you want to use it.
67+
68+
## Advanced Date and Time Usage
69+
70+
We use [LiquidJS](https://liquidjs.com/) for dynamic variables. You can use the `date` filter to format the date and time in the timezone you want.
71+
72+
```liquid
73+
{{"now" | date: "%b %d, %Y, %I:%M %p", "America/New_York"}}
74+
```
75+
76+
This should return the current date and time in New York.

0 commit comments

Comments
 (0)