Basit Ali
Basit Ali

Reputation: 155

How to get yesterday date in coldfusion

I want to get yesterday date from the current date in coldfusion.

<cfset yesterday = DateFormat(DateAdd('d',-7,Now()), 'mm/dd/yyyy')>

Upvotes: 1

Views: 1091

Answers (1)

Techleadz Team
Techleadz Team

Reputation: 318

This is good it should work.

<cfset yesterday = DateFormat(DateAdd('d',-1,Now()), 'mm/dd/yyyy')>

Upvotes: 4

Related Questions