# HmsToSec

From DescTools v0.99.19
by Andri Signorell

##### Convert h:m:s To/From Seconds

`HmsToSec`

- Converts a vector of h:m:s to seconds.

`SecToHms`

- Converts a vector of seconds to h:m:s.

- Keywords
- chron

##### Usage

```
HmsToSec(x)
SecToHms(x, digits = NULL)
```

##### Arguments

- x
- A vector of times in h:m:s (for
`HmsToSec`

) or seconds (for`SecToHms`

). - digits
- the number of digits to use for potential fractions of seconds.

##### Value

`HmsToSec`

- Returns a vector of times in seconds.`SecToHms`

- Returns a vector of times in h:m:s format.
##### See Also

##### Examples

```
HmsToSec(c("02:00:03", "04:03:01"))
HmsToSec(SecToHms(c(222, 1234, 55)))
SecToHms(c(256, 3456, 56565))
```

*Documentation reproduced from package DescTools, version 0.99.19, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.