# chopMilliseconds

Industry: Core

## Signature

```ts
chopMilliseconds(value: string): string
```

Return a string with millisecond precision removed from a PlainDateTime or PlainTime value.

- Truncates to second precision.
- Accepts both PlainDateTime and PlainTime formats.
- Returns "" for invalid input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | ISO PlainDateTime or PlainTime string |

## Returns

ISO string without milliseconds, or "" on invalid input

## Examples

```ts
import { chopMilliseconds } from "@northguild/gmt/plain/chop";

chopMilliseconds("2024-02-29T12:34:56.789") // "2024-02-29T12:34:56"
```

## Source

[plain/chop/chopMilliseconds.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/plain/chop/chopMilliseconds.ts)
