Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Answered

How to set an Expiry Date on a Webpage?

(0) ShareShare
ReportReport
Posted on by 40

It seems that Microsoft took away the automated ability for the expiry date setting in Page Settings. 

 

Does anyone know how we can achieve this functionality now? 

Objective: Shutdown the page/form at 11:59pm 

 

Manage web pages | Microsoft Learn

TA_Jeremy_0-1717529521658.png

 

Categories:
  • JW-22072146-0 Profile Picture
    40 on at
    Re: How to set an Expiry Date on a Webpage?

    This is awesome, thanks so much! 

  • Verified answer
    Fubar Profile Picture
    8,023 Super User 2025 Season 1 on at
    Re: How to set an Expiry Date on a Webpage?

    Use Liquid, couple of options depending on what you need (may need both depending)

    • Could edit the 'Header' Web Template to not populate it in the menu
    • Wrap the page content in a Liquid 'if' and check for the date, if still valid show content else show message on the screen 

    Liquid has a 'now' object to get the current date-time and the expiry field is probably still exposed on the 'page' object so could possibly still use it.

    https://learn.microsoft.com/en-us/power-pages/configure/liquid/control-flow-tags#if

    https://learn.microsoft.com/en-us/power-pages/configure/liquid/liquid-types#datetime

    https://learn.microsoft.com/en-us/power-pages/configure/liquid/liquid-filters#date-filters

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35