# nanosecond {#nanosecond}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`nanosecond(X)`

## Arguments {#arguments}

**X** is a scalar/vector of type TIME, TIMESTAMP, NANOTIME or NANOTIMESTAMP.

## Details {#details}

For each element in *X*, return a number indicating which nanosecond of the second it falls in.

## Examples {#examples}

```
nanosecond(13:30:10.008);
// output: 8000000

nanosecond([2012.12.03 01:22:01.999999999, 2012.12.03 01:25:08.000000234]);
// output: [999999999,234]
```

Related functions: [dayOfYear](../d/dayOfYear.md), [dayOfMonth](../d/dayOfMonth.md), [quarterOfYear](../q/quarterOfYear.md), [monthOfYear](../m/monthOfYear.md), [weekOfYear](../w/weekOfYear.md), [hourOfDay](../h/hourOfDay.md), [minuteOfHour](../m/minuteOfHour.md), [secondOfMinute](../s/secondOfMinute.md), [millisecond](../m/millisecond.md), [microsecond](../m/microsecond.md)

