Links
Comment on page

Current Time

This property is used to get the current date and time. You can access this when the Source is set to Global Properties.
You can use this property to display the current date and time on screen or pass it to the FlutterFlow or Custom widget.

Example

Let's see an example of getting the current date time and passing it to a widget (that supports accepting date-time).
Here is an example of how you can retrieve the current date and time:
  1. 1.
    Select the widget (e.g., Text, TextField, Calendar) from the widget tree or canvas area.
  2. 2.
    Move to the properties panel, and click on Set from Variable.
  3. 3.
    Set the Source to Global Properties.
  4. 4.
    Set the Available Options to the Current Time.
  5. 5.
    If available, select the Date Format Options to format the date time.
  6. 6.
    Click Confirm.
Getting current date time

Custom formatting

Sometimes you might need to display dates and times in a format that we don't support. This is where the custom date and time formatting comes into play. Custom Format enables you to represent date and time data in a multitude of ways.
For example, you can enter the text like 'yyyy/MM/dd || kk:mm', and the date time will be displayed as '2023/07/25 || 10:30'.
In the above example, 'yyyy/MM/dd || kk:mm is the custom format. Here's what it stands for:
  • yyyy: four-digit year
  • MM: two-digit month
  • dd: two-digit day
  • kk: two-digit hour (24-hour format)
  • mm: two-digit minute
Here are some more format specifiers which you can use the build the custom format:
  • yy: Two-digit year. For example, "23" for 2023.
  • hh: Two-digit hour (12-hour clock). For example, "03" for 3 AM or "03" for 3 PM.
  • HH: Two-digit hour (24-hour clock). For example, "03" for 3 AM or "15" for 3 PM.
  • ss: Two-digit second. For example, "07" for 7 seconds past the minute.
  • SSS: Three-digit millisecond. For example, "123" for 123 milliseconds.
  • EEEE: Full weekday name. For example, "Monday", "Tuesday", and so on.
  • MMMM: Full month name. For example, "January", "February", and so on.
  • E: Short weekday name. For example, "Mon" for Monday, "Tue" for Tuesday, and so on.
  • MMM: Short month name. For example, "Jan" for January, "Feb" for February, and so on.
  • a: AM/PM indicator. For example, "AM" or "PM".
  • LLL: Standalone month name in short form. For example, "Jan" for January.
  • QQQQ: Quarter of the year spelled out. For example, "1st quarter" for the first quarter (January - March).
  • w: Week of the year as a single-digit. For example, "1" for the first week of the year.
  • ww: Week of the year as a two-digit number. For example, "01" for the first week of the year.
  • W: Week of the month as a single-digit. For example, "2" for the second week of the month.
  • D: Day of the year as a single-digit. For example, "1" for January 1st.
  • DD: Day of the year as a two-digit number. For example, "01" for January 1st.
  • DDD: Day of the year as a three-digit number. For example, "001" for January 1st.
  • F: Day of the week in the month. For example, "2" for the second Monday of the month.
  • k: Hour of the day in 24-hour format (1-24). For example, "13" for 1 PM.
  • K: Hour of the day in 12-hour format (0-11). For example, "1" for 1 AM or 1 PM.
  • z: Time zone abbreviated. For example, "PST" for Pacific Standard Time.
  • zzzz: Time zone spelled out. For example, "Pacific Standard Time".
Custom Date Formatting