Question: I have an application based in the Spring Web model-view-controller (MVC) framework.
I have this piece of code in my JSP, but when I click the button the form does not submit

```
<script type="text/javascript">
$('#confirmApplicationProcessButtonId').click(function(){
                    $('#deviceFormId').attr('method', 'post');
                    $('#deviceFormId').attr('action', '${contextPath}/device/submit');
                    $('#deviceFormId').submit();

                });
</script>

<form:form commandName="deviceForm"
                                                name="deviceForm"
                                                id="deviceFormId"
                                                method="get"
                                                action="${contextPath}/newdesign/applicant/device/${deviceForm.device.id}"                                              
                                                htmlEscape="yes"
                                                enctype="multipart/form-data">

<button type="button" class="btn btn-primary"            id="confirmApplicationProcessButtonId"         disabled="disabled" ><fmt:message key="confirm.device.process" /></button>

</form:form>

```

Answer: 
I'm not sure what equivalent are you looking for, but:

* [there is no nanosecond precision](https://www.postgresql.org/docs/current/static/datatype-datetime.html) in PostgreSQL: *The allowed range of p* (precision) *is from 0 to 6 for the `timestamp` and `interval` types.*
* some date parts include others: i.e. `milliseconds` contains `seconds` & `microseconds` contains `milliseconds` (and thus `seconds` too).

If you are looking for logically separate values, you'll need to do some math, e.g.:

```
select extract(dow from ts) dow,       -- day-of-week (where weeks start on sunday, which is 0)
       extract(isodow from ts) isodow, -- ISO day-of-week (where weeks start on monday, which is 1)
       floor(extract(seconds from ts))::int only_seconds,
       floor(extract(milliseconds from ts))::int - 1000 * floor(extract(seconds from ts))::int only_milliseconds,
       floor(extract(microseconds from ts))::int - 1000 * floor(extract(milliseconds from ts))::int only_microseconds,
       extract(microseconds from ts) all_microseconds

```

Or, if you are looking to how far a timestamp is within its actual week, you can use `timestamp` (and `interval`) arithmetics too:

```
select ts - date_trunc('week', ts) time_elapsed_since_monday

```

(Although it is rather hard to calculate this for weeks which start on sunday: `date_trunc` works with only ISO weeks).

<http://rextester.com/SOOO48159>
As far as I know Postgres doesn't support nanoseconds. For the rest:

> 
> 
> ```
> select extract(dow from timestamp '2001-02-16 20:38:40.5');
> 
> ```
> 
> 
> ```
> 
> | date_part |
> | :-------- |
> | 5         |
> 
> ```
> 
> 

> 
> 
> ```
> select extract(milliseconds from timestamp '2001-02-16 20:38:40.5');
> 
> ```
> 
> 
> ```
> 
> | date_part |
> | :-------- |
> | 40500     |
> 
> ```
> 
> 

> 
> 
> ```
> select extract(microseconds from timestamp '2001-02-16 20:38:40.5');
> 
> ```
> 
> 
> ```
> 
> | date_part |
> | :-------- |
> | 40500000  |
> 
> ```
> 
> 

*dbfiddle [here](http://dbfiddle.uk/?rdbms=postgres_9.6&fiddle=3aa7c06c29d11be9043b715edaa1f33c)*