# Time

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/java/sql/Time#pubctors)\|[Methods](https://developer.android.com/reference/java/sql/Time#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/java/sql/Time#inhmethods)  

# Time

`
public


class
Time
`  
`


``

extends `[Date](https://developer.android.com/reference/java/util/Date)`


``


`

|---|---|---------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [java.util.Date](https://developer.android.com/reference/java/util/Date) ||
|   | ↳ | java.sql.Time |

<br />

*** ** * ** ***

<br />

A thin wrapper around the`java.util.Date`class that allows the JDBC API to identify this as an SQL`TIME`value. The`Time`class adds formatting and parsing operations to support the JDBC escape syntax for time values.

The date components should be set to the "zero epoch" value of January 1, 1970 and should not be accessed.

## Summary

|                                                                                                               ### Public constructors                                                                                                               ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Time](https://developer.android.com/reference/java/sql/Time#Time(int,%20int,%20int))`(int hour, int minute, int second) ` *This constructor is deprecated. Use the constructor that takes a milliseconds value in place of this constructor* |
| ` `[Time](https://developer.android.com/reference/java/sql/Time#Time(long))`(long time) ` Constructs a`Time`object using a milliseconds time value.                                                                                              |

|                                                                                                                                               ### Public methods                                                                                                                                                ||
|-------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`                                                                  | ` `[getDate](https://developer.android.com/reference/java/sql/Time#getDate())`() ` *This method is deprecated. This method is deprecated and should not be used because SQL`TIME`values do not have a date component.*                 |
| ` int`                                                                  | ` `[getDay](https://developer.android.com/reference/java/sql/Time#getDay())`() ` *This method is deprecated. This method is deprecated and should not be used because SQL`TIME`values do not have a day component.*                    |
| ` int`                                                                  | ` `[getMonth](https://developer.android.com/reference/java/sql/Time#getMonth())`() ` *This method is deprecated. This method is deprecated and should not be used because SQL`TIME`values do not have a month component.*              |
| ` int`                                                                  | ` `[getYear](https://developer.android.com/reference/java/sql/Time#getYear())`() ` *This method is deprecated. This method is deprecated and should not be used because SQL`TIME`values do not have a year component.*                 |
| ` void`                                                                 | ` `[setDate](https://developer.android.com/reference/java/sql/Time#setDate(int))`(int i) ` *This method is deprecated. This method is deprecated and should not be used because SQL`TIME`values do not have a date component.*         |
| ` void`                                                                 | ` `[setMonth](https://developer.android.com/reference/java/sql/Time#setMonth(int))`(int i) ` *This method is deprecated. This method is deprecated and should not be used because SQL`TIME`values do not have a month component.*      |
| ` void`                                                                 | ` `[setTime](https://developer.android.com/reference/java/sql/Time#setTime(long))`(long time) ` Sets a`Time`object using a milliseconds time value.                                                                                    |
| ` void`                                                                 | ` `[setYear](https://developer.android.com/reference/java/sql/Time#setYear(int))`(int i) ` *This method is deprecated. This method is deprecated and should not be used because SQL`TIME`values do not have a year component.*         |
| ` `[String](https://developer.android.com/reference/java/lang/String)   | ` `[toString](https://developer.android.com/reference/java/sql/Time#toString())`() ` Formats a time in JDBC time escape format.                                                                                                        |
| ` static `[Time](https://developer.android.com/reference/java/sql/Time) | ` `[valueOf](https://developer.android.com/reference/java/sql/Time#valueOf(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` s) ` Converts a string in JDBC time escape format to a`Time`value. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.util.Date](https://developer.android.com/reference/java/util/Date)` ` |--------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` static long`                                                           | ` `[UTC](https://developer.android.com/reference/java/util/Date#UTC(int,%20int,%20int,%20int,%20int,%20int))`(int year, int month, int date, int hrs, int min, int sec) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.set(year + 1900, month, date, hrs, min, sec)`or`GregorianCalendar(year + 1900, month, date, hrs, min, sec)`, using a UTC`TimeZone`, followed by`Calendar.getTime().getTime()`.* | | ` boolean`                                                               | ` `[after](https://developer.android.com/reference/java/util/Date#after(java.util.Date))`(`[Date](https://developer.android.com/reference/java/util/Date)` when) ` Tests if this date is after the specified date.                                                                                                                                                                                                                                 | | ` boolean`                                                               | ` `[before](https://developer.android.com/reference/java/util/Date#before(java.util.Date))`(`[Date](https://developer.android.com/reference/java/util/Date)` when) ` Tests if this date is before the specified date.                                                                                                                                                                                                                              | | ` `[Object](https://developer.android.com/reference/java/lang/Object)    | ` `[clone](https://developer.android.com/reference/java/util/Date#clone())`() ` Return a copy of this object.                                                                                                                                                                                                                                                                                                                                      | | ` int`                                                                   | ` `[compareTo](https://developer.android.com/reference/java/util/Date#compareTo(java.util.Date))`(`[Date](https://developer.android.com/reference/java/util/Date)` anotherDate) ` Compares two Dates for ordering.                                                                                                                                                                                                                                 | | ` boolean`                                                               | ` `[equals](https://developer.android.com/reference/java/util/Date#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Compares two dates for equality.                                                                                                                                                                                                                                         | | ` static `[Date](https://developer.android.com/reference/java/util/Date) | ` `[from](https://developer.android.com/reference/java/util/Date#from(java.time.Instant))`(`[Instant](https://developer.android.com/reference/java/time/Instant)` instant) ` Obtains an instance of`Date`from an`Instant`object.                                                                                                                                                                                                                   | | ` int`                                                                   | ` `[getDate](https://developer.android.com/reference/java/util/Date#getDate())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.get(Calendar.DAY_OF_MONTH)`.*                                                                                                                                                                                                                                         | | ` int`                                                                   | ` `[getDay](https://developer.android.com/reference/java/util/Date#getDay())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.get(Calendar.DAY_OF_WEEK)`.*                                                                                                                                                                                                                                            | | ` int`                                                                   | ` `[getHours](https://developer.android.com/reference/java/util/Date#getHours())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.get(Calendar.HOUR_OF_DAY)`.*                                                                                                                                                                                                                                        | | ` int`                                                                   | ` `[getMinutes](https://developer.android.com/reference/java/util/Date#getMinutes())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.get(Calendar.MINUTE)`.*                                                                                                                                                                                                                                         | | ` int`                                                                   | ` `[getMonth](https://developer.android.com/reference/java/util/Date#getMonth())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.get(Calendar.MONTH)`.*                                                                                                                                                                                                                                              | | ` int`                                                                   | ` `[getSeconds](https://developer.android.com/reference/java/util/Date#getSeconds())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.get(Calendar.SECOND)`.*                                                                                                                                                                                                                                         | | ` long`                                                                  | ` `[getTime](https://developer.android.com/reference/java/util/Date#getTime())`() ` Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this`Date`object.                                                                                                                                                                                                                                                        | | ` int`                                                                   | ` `[getTimezoneOffset](https://developer.android.com/reference/java/util/Date#getTimezoneOffset())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`-(Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000)`.*                                                                                                                                                                 | | ` int`                                                                   | ` `[getYear](https://developer.android.com/reference/java/util/Date#getYear())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.get(Calendar.YEAR) - 1900`.*                                                                                                                                                                                                                                          | | ` int`                                                                   | ` `[hashCode](https://developer.android.com/reference/java/util/Date#hashCode())`() ` Returns a hash code value for this object.                                                                                                                                                                                                                                                                                                                   | | ` static long`                                                           | ` `[parse](https://developer.android.com/reference/java/util/Date#parse(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` s) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`DateFormat.parse(String s)`.*                                                                                                                                                                | | ` void`                                                                  | ` `[setDate](https://developer.android.com/reference/java/util/Date#setDate(int))`(int date) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.set(Calendar.DAY_OF_MONTH, int date)`.*                                                                                                                                                                                                                    | | ` void`                                                                  | ` `[setHours](https://developer.android.com/reference/java/util/Date#setHours(int))`(int hours) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.set(Calendar.HOUR_OF_DAY, int hours)`.*                                                                                                                                                                                                                 | | ` void`                                                                  | ` `[setMinutes](https://developer.android.com/reference/java/util/Date#setMinutes(int))`(int minutes) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.set(Calendar.MINUTE, int minutes)`.*                                                                                                                                                                                                              | | ` void`                                                                  | ` `[setMonth](https://developer.android.com/reference/java/util/Date#setMonth(int))`(int month) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.set(Calendar.MONTH, int month)`.*                                                                                                                                                                                                                       | | ` void`                                                                  | ` `[setSeconds](https://developer.android.com/reference/java/util/Date#setSeconds(int))`(int seconds) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.set(Calendar.SECOND, int seconds)`.*                                                                                                                                                                                                              | | ` void`                                                                  | ` `[setTime](https://developer.android.com/reference/java/util/Date#setTime(long))`(long time) ` Sets this`Date`object to represent a point in time that is`time`milliseconds after January 1, 1970 00:00:00 GMT.                                                                                                                                                                                                                                  | | ` void`                                                                  | ` `[setYear](https://developer.android.com/reference/java/util/Date#setYear(int))`(int year) ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`Calendar.set(Calendar.YEAR, year + 1900)`.*                                                                                                                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)    | ` `[toGMTString](https://developer.android.com/reference/java/util/Date#toGMTString())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`DateFormat.format(Date date)`, using a GMT`TimeZone`.*                                                                                                                                                                                                                 | | ` `[Instant](https://developer.android.com/reference/java/time/Instant)  | ` `[toInstant](https://developer.android.com/reference/java/util/Date#toInstant())`() ` Converts this`Date`object to an`Instant`.                                                                                                                                                                                                                                                                                                                  | | ` `[String](https://developer.android.com/reference/java/lang/String)    | ` `[toLocaleString](https://developer.android.com/reference/java/util/Date#toLocaleString())`() ` *This method was deprecated in API level 15. As of JDK version 1.1, replaced by`DateFormat.format(Date date)`.*                                                                                                                                                                                                                                  | | ` `[String](https://developer.android.com/reference/java/lang/String)    | ` `[toString](https://developer.android.com/reference/java/util/Date#toString())`() ` Converts this`Date`object to a`String`of the form: > ``` >  dow mon dd hh:mm:ss zzz yyyy > ``` where: - `dow`is the day of the week (`Sun, Mon, Tue, Wed, Thu, Fri, Sat`). <br />                                                                                                                                                                            | ||
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||
| From interface` `[java.lang.Comparable](https://developer.android.com/reference/java/lang/Comparable)` ` |-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int` | ` `[compareTo](https://developer.android.com/reference/java/lang/Comparable#compareTo(T))`(`[Date](https://developer.android.com/reference/java/util/Date)` o) ` Compares this object with the specified object for order. | ||

## Public constructors

### Time

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Time (int hour, 
                int minute, 
                int second)
```

<br />

**This constructor is deprecated.**   
Use the constructor that takes a milliseconds value in place of this constructor

Constructs a`Time`object initialized with the given values for the hour, minute, and second. The driver sets the date components to January 1, 1970. Any method that attempts to access the date components of a`Time`object will throw a`java.lang.IllegalArgumentException`.

The result is undefined if a given argument is out of bounds.

<br />

|           Parameters            ||
|----------|-----------------------|
| `hour`   | `int`: 0 to 23 <br /> |
| `minute` | `int`: 0 to 59 <br /> |
| `second` | `int`: 0 to 59 <br /> |

### Time

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Time (long time)
```

Constructs a`Time`object using a milliseconds time value.

<br />

|                                                                   Parameters                                                                    ||
|--------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `time` | `long`: milliseconds since January 1, 1970, 00:00:00 GMT; a negative number is milliseconds before January 1, 1970, 00:00:00 GMT <br /> |

## Public methods

### getDate

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getDate ()
```

<br />

**This method is deprecated.**   
This method is deprecated and should not be used because SQL`TIME`values do not have a date component.

Returns the day of the month represented by this`Date`object. The value returned is between`1`and`31`representing the day of the month that contains or begins with the instant in time represented by this`Date`object, as interpreted in the local time zone.

<br />

|                           Returns                            ||
|-------|-------------------------------------------------------|
| `int` | the day of the month represented by this date. <br /> |

|                                                              Throws                                                               ||
|--------------------------------------------------------------------------------------------------------|---------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if this method is invoked |

**See also:**

- [setDate(int)](https://developer.android.com/reference/java/sql/Time#setDate(int))  

### getDay

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getDay ()
```

<br />

**This method is deprecated.**   
This method is deprecated and should not be used because SQL`TIME`values do not have a day component.

Returns the day of the week represented by this date. The returned value (`0`= Sunday,`1`= Monday,`2`= Tuesday,`3`= Wednesday,`4`= Thursday,`5`= Friday,`6`= Saturday) represents the day of the week that contains or begins with the instant in time represented by this`Date`object, as interpreted in the local time zone.

<br />

|                           Returns                           ||
|-------|------------------------------------------------------|
| `int` | the day of the week represented by this date. <br /> |

|                                                              Throws                                                               ||
|--------------------------------------------------------------------------------------------------------|---------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if this method is invoked |

### getMonth

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getMonth ()
```

<br />

**This method is deprecated.**   
This method is deprecated and should not be used because SQL`TIME`values do not have a month component.

Returns a number representing the month that contains or begins with the instant in time represented by this`Date`object. The value returned is between`0`and`11`, with the value`0`representing January.

<br />

|                      Returns                      ||
|-------|--------------------------------------------|
| `int` | the month represented by this date. <br /> |

|                                                              Throws                                                               ||
|--------------------------------------------------------------------------------------------------------|---------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if this method is invoked |

**See also:**

- [setMonth(int)](https://developer.android.com/reference/java/sql/Time#setMonth(int))  

### getYear

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getYear ()
```

<br />

**This method is deprecated.**   
This method is deprecated and should not be used because SQL`TIME`values do not have a year component.

Returns a value that is the result of subtracting 1900 from the year that contains or begins with the instant in time represented by this`Date`object, as interpreted in the local time zone.

<br />

|                           Returns                            ||
|-------|-------------------------------------------------------|
| `int` | the year represented by this date, minus 1900. <br /> |

|                                                              Throws                                                               ||
|--------------------------------------------------------------------------------------------------------|---------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if this method is invoked |

**See also:**

- [setYear(int)](https://developer.android.com/reference/java/sql/Time#setYear(int))  

### setDate

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setDate (int i)
```

<br />

**This method is deprecated.**   
This method is deprecated and should not be used because SQL`TIME`values do not have a date component.

Sets the day of the month of this`Date`object to the specified value. This`Date`object is modified so that it represents a point in time within the specified day of the month, with the year, month, hour, minute, and second the same as before, as interpreted in the local time zone. If the date was April 30, for example, and the date is set to 31, then it will be treated as if it were on May 1, because April has only 30 days.

<br />

|                         Parameters                          ||
|-----|--------------------------------------------------------|
| `i` | `int`: the day of the month value between 1-31. <br /> |

|                                                              Throws                                                               ||
|--------------------------------------------------------------------------------------------------------|---------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if this method is invoked |

**See also:**

- [getDate()](https://developer.android.com/reference/java/sql/Time#getDate())  

### setMonth

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setMonth (int i)
```

<br />

**This method is deprecated.**   
This method is deprecated and should not be used because SQL`TIME`values do not have a month component.

Sets the month of this date to the specified value. This`Date`object is modified so that it represents a point in time within the specified month, with the year, date, hour, minute, and second the same as before, as interpreted in the local time zone. If the date was October 31, for example, and the month is set to June, then the new date will be treated as if it were on July 1, because June has only 30 days.

<br />

|                    Parameters                    ||
|-----|---------------------------------------------|
| `i` | `int`: the month value between 0-11. <br /> |

|                                                              Throws                                                               ||
|--------------------------------------------------------------------------------------------------------|---------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if this method is invoked |

**See also:**

- [getMonth()](https://developer.android.com/reference/java/sql/Time#getMonth())  

### setTime

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setTime (long time)
```

Sets a`Time`object using a milliseconds time value.

<br />

|                                                                   Parameters                                                                    ||
|--------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `time` | `long`: milliseconds since January 1, 1970, 00:00:00 GMT; a negative number is milliseconds before January 1, 1970, 00:00:00 GMT <br /> |

### setYear

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setYear (int i)
```

<br />

**This method is deprecated.**   
This method is deprecated and should not be used because SQL`TIME`values do not have a year component.

Sets the year of this`Date`object to be the specified value plus 1900. This`Date`object is modified so that it represents a point in time within the specified year, with the month, date, hour, minute, and second the same as before, as interpreted in the local time zone. (Of course, if the date was February 29, for example, and the year is set to a non-leap year, then the new date will be treated as if it were on March 1.)

<br />

|             Parameters             ||
|-----|-------------------------------|
| `i` | `int`: the year value. <br /> |

|                                                              Throws                                                               ||
|--------------------------------------------------------------------------------------------------------|---------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if this method is invoked |

**See also:**

- [getYear()](https://developer.android.com/reference/java/sql/Time#getYear())  

### toString

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String toString ()
```

Formats a time in JDBC time escape format.

<br />

|                                                Returns                                                 ||
|--------------------------------------------------------------------|------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a`String`in hh:mm:ss format <br /> |

### valueOf

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Time valueOf (String s)
```

Converts a string in JDBC time escape format to a`Time`value.

<br />

|                   Parameters                    ||
|-----|--------------------------------------------|
| `s` | `String`: time in format "hh:mm:ss" <br /> |

|                                              Returns                                              ||
|---------------------------------------------------------------|------------------------------------|
| [Time](https://developer.android.com/reference/java/sql/Time) | a corresponding`Time`object <br /> |