---
schema_version: "1"
id: d343fbf4bf178c239594d7e507c0038686e239544527ab8fb59eedea3a99134f
title: Formatted Time
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/lwc/components/lightning/formattedTime/lightning-formatted-time.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-formatted-time.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b465bf2833c9506efd8fd45d71f031bc92059a16eafaacf93644e34a5fc28a50
products:
  - Lightning Component Reference
---

# Formatted Time

**`lightning-formatted-time`**

Displays a formatted time in user's locale format.

**For Use In**

Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App, Mobile Offline

::::::tabset{tabs='["Example", "Develop", "Specifications"]'}

:::::tab

::component-playground{component="formattedTime" model="lwc" namespace="lightning"}


:::::

:::::tab

A `lightning-formatted-time` component shows a read-only representation of
time in the user's locale format. Use a valid ISO8601 formatted time string only.

An ISO8601 formatted time string matches one of these patterns.

- HH:mm
- HH:mm:ss
- HH:mm:ss.SSS

`HH` is the number of hours that have passed since midnight, `mm` is the
number of minutes that have passed since the start of the hour, `ss` is
the number of seconds since the start of the minute, and `SSS` is the number
of milliseconds since the start of the second. Time is always displayed in Universal Time (UTC).

`lightning-formatted-time` doesn't support offsets and it ignores them. For example, `14:30+05:00` is treated as `14:30`.

This example returns `10:12:30 PM`.

<!-- prettier-ignore-start -->
```html
<template>
    <lightning-formatted-time value="22:12:30.999"> </lightning-formatted-time>
</template>
```
<!-- prettier-ignore-end -->

Salesforce uses the format HH:mm:ss.SSSZ for time fields. The time field is a
timestamp without the date included. Time values in Salesforce aren't
localized or associated with a time zone.

## See Also

[_Object Reference for the Salesforce Platform_: Field Types](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/field_types.htm)


:::::

:::::tab
::component-specification{component="formattedTime" model="lwc" namespace="lightning"}

:::::

::::::
