You can translate the question and the replies:

Base view Milli Seconds Issue

I have created base view with the data type as 'ENDDATE' :'java.sql.Timestamp' (OPT) (sourcetyperadix='10', sourcetypename='TIMESTAMP(6)', sourcetypeid='93', sourcetypedecimals='6', sourcetypesize='11')  SORTABLE. In my source date having milli seconds 'Fri Jun 16 04:05:55.25896 IST 2017' but my view giving without milli seconds 'Fri Jun 16 04:05:55 IST 2017'. How can i get milli seconds in my view's output?
user
10-08-2018 23:29:55 -0400
code

4 Answers

Hi, You can use the FORMATDATE function to format the timestamp to include the milliseconds. For this case, I would create a create a derived view and then, add a new field which utilizes the below formatdate function. `FORMATDATE(‘EEE MMM dd HH:mm:ss.SSSS zzz yyyy’, <date_field>)` You may refer to the [Date and Time Pattern Strings](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/appendix/date_and_time_pattern_strings/date_and_time_pattern_strings#date-and-time-pattern-strings) section and [Date Processing Functions](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/appendix/syntax_of_condition_functions/date_processing_functions#formatdate) section of the Virtual DataPort VQL Guide for more information. Hope this helps!
Denodo Team
13-08-2018 05:35:12 -0400
code
Hi, I am using Formatdate but i am geeting 3 digits of millliseconds only able to view. I want to view upto 6 digits.Source is ‘Fri Jun 16 04:05:55.258961 IST 2017’ but output is ‘Fri Jun 16 04:05:55.258 IST 2017’
user
 Edited on: 20-09-2018 03:53:25 -0400
Hi, This question has been answered in the similar community question [Timestamp Millisecond issue](https://community.denodo.com/answers/question/details?questionId=9060g0000000AqyAAE&title=Timestamp+Millisecond+issue). Hope this helps!
Denodo Team
31-08-2018 04:43:34 -0400
code
Hi team, If the data type is timestamp then as per the KB it should display the date till mili second. Is that not correct? Why to format a timestamp field again? TIMESTAMP - denodo Timestamp without a time zone (year, month, day, hour, minute, second and fraction of second with nanosecond precision) Thanks!
user
02-06-2021 16:49:17 -0400
You must sign in to add an answer. If you do not have an account, you can register here