# TimeToString

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/date-functions/timetostring
>
> TimeToString formats a time in HHMMSS format as a string using a format built from HH, MM and SS, such as HH:MM:SS or HH:MM.

This Function returns a _\<string>_ which is the specified **Time** formatted with the specified **Format**. The specified **Time** must be in format HHMMSS.

### Parameters

* **Time** _\<string> -_ Original string to be completed.
* **Format** _\<string> -_ Choose one of the predefined options or combine HH, MM, and SS, where:
  * HH - Hour
  * MM - Minute
  * SS - Second

### Examples

* _Example 1_

TimeToString("093015", "HH:MM:SS")\
**Result** = 09:30:15

* _Example 2_

TimeToString("093015", "HH:MM")\
**Result** = 09:30

* _Example 3_

TimeToString("093015", "HH")\
**Result** = 09

* _Example 4_

TimeToString("093015", "MM")\
**Result** = 03
