Only show time on date/time field in portal

SN_BUDDY
Tera Guru

Hi All,

 

I have a requirement where i need to only show a time field in the time sheet portal form view. When adding a time field it shows as a string. When adding a date/time field it will show as expected. I would like the date/time field to only show the time element as that is which is needed. 

 

Your help is much appreciated

3 REPLIES 3

Community Alums
Not applicable

Hi @SN_BUDDY ,

Have you tried using "Time" data type instead of "Date/Time"?

 

Hi Sandeep,

 

Yes i have tried this as mentioned but it only shows in the portal as a string field. I would like the time picker to be shown and selectable. 

Hope this makes it a little clearer but happy to provide more information

 

Thanks

roshanmadhave
Tera Contributor

You Can Take "Single Line Text " type  field and You Can Specify the the below code in default value section .

 

javascript:gs.nowDateTime().split(" ")[1];

 

 it gives the current time .