AppAlloy Documentation
Home
  • Glossary
  • 🚀Getting Started
    • Introduce AppAlloy Documentation
    • Build your first AppAlloy app
    • From sheet to app
  • 🗃️Data management
    • Learn data structure
    • Set up data source
      • Integrate with Google Sheets
      • Integrate with Microsoft Excel
      • Build Alloy table
      • Upload local file
    • Manage data type
    • Ultimate guide for data sheet
  • ⚒️Manage table views
    • Design Record View
    • Design Actions
      • Update current record
      • Delete current record
      • Delete many records
      • Create record
      • Open external URL
      • HTTP Request
      • Open phone call popup
      • Open SMS Popup
      • Open email popup
      • Send notification
    • Design Record Components
      • Plain Text
      • Phone number
      • Email
      • URL
      • Map
      • Barcode
      • Checkbox
      • Number
      • Currency
      • Rating
      • Voting
      • Date time
      • Relative date
      • Count Down / Count Up
      • Single Photo
      • Photo Gallery
      • Carousel
      • Audio Player
      • Video Player
      • Youtube Player
      • Vimeo Player
    • Design Form View
    • Design Form fields (synced tables)
      • Text (for synced tables)
      • Number (for synced tables)
      • Date time (for synced tables)
      • Checkbox (for synced table)
      • Options (for synced table)
      • Photos (for synced table)
      • Files (for synced table)
      • Table lookup (for synced table)
      • Signature (for synced table)
    • Design Form fields (Alloy tables)
      • Single line Text (for Alloy table)
      • Long Text (for Alloy table)
      • Phone number (for Alloy table)
      • Email (for Alloy table)
      • Barcode (for Alloy table)
      • Number (for Alloy table)
      • Currency (for Alloy table)
      • Checkbox (for Alloy table)
      • Date (for Alloy table)
      • Photos (for Alloy table)
      • Files (for Alloy table)
      • Single select (for Alloy table)
      • Multiple select (for Alloy table)
      • Address (for Alloy table)
      • Table lookup (for Alloy table)
  • 🎨Manage pages
    • Manage page types
    • Design 'View From' Page
    • Page Layouts
      • List Layout
      • Grid Layout
      • Card Layout
      • Map Layout
      • Checklist Layout
      • Calendar Layout
      • Kanban Layout
    • Design Canvas View Page
    • Canvas Charts
      • Line chart
      • Area Chart
      • Pie Chart
      • Donut Chart
      • Column chart vs. Stacked Column chart
      • Bar chart vs. Stacked bar chart
      • Table
    • Design Form of... Page
  • ⚙️Manage workflow
    • Introduce Workflow
    • Design a workflow
  • 🔌Manage Integration
    • Manage AppAlloy Integration
    • Manage Slack Integration
    • Manage Gmail Integration
    • Manage Google Drive Integration
    • Manage Google Calendar integration
  • 📱Manage App Settings
    • Manage app appearance
  • 🌎App distribution
    • Publish your app
    • Use app as Mobile Web app
    • Use app on AppAlloy Air
  • 🚹Account, team, and plan
    • Manage Account
    • Manage Apps
    • Manage Users
    • Manage Plans
    • Manage Teams
  • #️⃣Learn Power FX
    • Introduce Power FX
    • Operators & Identifiers
    • Formula References
      • Average
      • Concatenate
      • Date
      • DateAdd
      • DateDiff
      • DateValue
      • DateTimeValue
      • Day
      • If
      • Month
      • Now
      • Rand
      • RandBetween
      • Round
      • RoundDown
      • RoundUp
      • Sum
      • Text
      • Today
      • Weeknum
      • Weekday
      • Year
Powered by GitBook
On this page
  • Syntax
  • Examples
  • Limitations

Was this helpful?

  1. Learn Power FX
  2. Formula References

Today

returns the current date

The Today() function in Power FX returns the current date without the time component. It’s useful for comparing dates, setting deadlines, calculating durations, or triggering actions based on today’s date.

Syntax

the basic syntax is

Today()

Since the format of DateTime data of the Alloy table is ISO 8601 formatted, while the Date Time data as the result of the syntax Today() is not, you will need to:

  • convert the DateTime data of the Alloy table if you want to subtract the difference between it with Today()

DateDiff(DateValue(ThisItem.DateTimeColumn),Today(),TimeUnit[Unit]
or
DateDiff(DateTimeValue(ThisItem.DateTimeColumn),Today(),TimeUnit[Unit]
  • convert the Date Time data with is the result of the syntax Today()to ISO 8601 format for the data representation in the app.

Text(Today(),"yyyy-MM-dd")
or
Text(Today(),"yyyy-MM-dd hh:mm:ss")

Examples

Below are some examples for practical usages with syntax Today():

Syntax
Description

DateDiff(Today(), DateValue(ThisItem.Deadline), TimeUnit.Days)

calculates the difference in days between today’s date and the deadline.

If(DateValue(ThisItem.Deadline) = Today(), "Due Today", "Upcoming")

checks if the task deadline is today and returns "Due Today" if true.

If(ThisItem.Status <> "Completed" && DateValue(ThisItem.Deadline) < Today(), "Overdue", "")

add an "Overdue" status when the task's deadline has passed, and the task is not completed.

Limitations

Today() do not include the time component.

If you need the current time as well, use the Now() function, which returns both date and time.

Last updated 7 months ago

Was this helpful?

#️⃣