Skip to main content
Nintex Community Menu Bar
Question

display text in a field less right 8 characters

  • July 9, 2024
  • 1 reply
  • 15 views
  • Translate All

Forum|alt.badge.img

How do I present text in a date/ time field displaying only the date, or - right 8 characters?

Thanks,
PSB

This topic has been closed for replies.

1 reply

Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

Skuid uses the JQuery date control  (see http://api.jqueryui.com/datepicker/)  and you can create a custom date formatting.  Here is an example inline snippet: 

var $ = skuid.$; var field = arguments[0]; var value = arguments[1]; var jsdate = new Date(); //use skuid util to change SF date to JS date jsdate = skuid.time.parseSFDate(value); //uses jQuery UI Datepicker.formatDate tools skuid.ui.fieldRenderers.TEXT[field.mode](field, $.datepicker.formatDate( "mm/dd/yy", jsdate));


The key text is in the last line.   $.datepicker.formatDate(  XXX , jsdate  )      Use the Datepicker documentation linked above to find other options for formatting dates. 

You can do similar things with strings,  manipulating them so only certain sections of the string show. 

  

Translate