cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Automatically get yesterday's date

Elise_B
Level III

Good morning,

I run a script automatically every day that uses the previous day's date at midnight. I would like to retrieve this date automatically but I don't know how to achieve this. Do you have any answers?

Thank you in advance for your answers

Elise.

This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User


Re: Obtenir automatiquement la date de la veille

Try using Date Increment with Today():

Names Default To Here(1);lastDay = Date Increment(Today(), "day", -1, "start");
//Print(Format(lastDay, "Format Pattern", "<YYYY></><MM></><DD> <hh24><:><mm><:><ss>")); //"2021/08/25 00:00:00"
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User


Re: Obtenir automatiquement la date de la veille

Try using Date Increment with Today():

Names Default To Here(1);lastDay = Date Increment(Today(), "day", -1, "start");
//Print(Format(lastDay, "Format Pattern", "<YYYY></><MM></><DD> <hh24><:><mm><:><ss>")); //"2021/08/25 00:00:00"
-Jarmo
Elise_B
Level III

Re: Automatically get yesterday's date

Thank you very much that's exactly what I needed!

This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .