Time

How to add and format 'Time' parts.

What Are Time Parts?

'Time' parts allow you to display and format dates and times in various customizable ways. Users can choose from a variety of formats, such as DD MM YYYY, MM/DD/YYYY, YYYY-MM-DD, and many others. This flexibility enables users to represent date and time information according to their preferences or specific regional formats.

Example Time Parts

How Are Time Formats Useful?

There are many reasons why it is useful to have different date and time formats available.

Different users might prefer different date formats based on their region or personal habits. For example, users in the US commonly use MM/DD/YYYY, while those in many European countries, and Australia, prefer DD/MM/YYYY.

Businesses often need to generate reports in specific date formats for consistency and compliance with regional standards.

Applications with a global user base can cater to users from different parts of the world by offering their preferred date formats.

Whether for personal use, business applications, or educational purposes, the ability to format dates and times flexibly makes the tool versatile and applicable in various scenarios.

Understanding the Time Format

Let's take a look at how we can format a date and time - Monday 3 June, at 5:01pm. There are several different ways we can use the date format to represent this:

dddd

The full day - Monday

ddd

The shortened version of the day - Mon

dd

A more shortened version of the day - Mo

DD

The number of the day in the month - 03

D

The number of the day in the month, without any leading zeros - 3

MMMM

The full month - June

MMM

The shortened version of the month - Jun

MM

The number of the month - 06

M

The number of the month, without any leading zeros - 6

hh

The hour - 05

h

The hour, without any leading zeros - 5

a

Represents whether it is am or pm

For example:

To write Monday 03 Jun 2024, 05:01 pm, the Time Format would be dddd DD MMM YYYY, hh:mm a.

Using the Time Format in the Property Editor

To format the 'Time' part, select it to activate the property editing panel on the right, then go to Format:

Format Property

Then key in the value to represent the time format.

Example of Using Time Formats

The time parts in the Part Library are set to have the time as 'now', meaning that whenever you add a time, the current time will be shown.

You can override this by manually entering a value, using the Value property in the right property editing panel.

Styling the Time Part

Like many other parts, colors, borders, shadow, opacity, rounding, and spacing can be applied using the property editor on the right, once the Time part has been selected.

Similar to a text part, the time part has a Font Editor, allowing you to select the font family, size, weight, line height, and style of the text.

Last updated

Was this helpful?