Share:
Developers » Scripting Code Samples » Date and Number Formats

PREVIOUS  |  NEXT

Date and Number Formats

Quick Links


Notice: We are currently working to improve this content. Once revisions are finalized, we will add the article to the Recently Updated Articles section on the product's Documentation Home page. Learn more.

Date Formats

To configure a specific date format on a custom field: 

def current_date = new Date();

String currentDate = current_date.format( 'MMMMMMMM dd, yyyy' );
logger.debug('Workflow Online Help Example', 'code=' + currentdate);


Number Formats

You can use the standard Java NumberFormat class, such as in the following example:

import java.text.NumberFormat;

def numberFormat = NumberFormat.getNumberInstance(Locale.GERMAN); 
currentCase.setCustomField('customField_id',numberFormat.format(value));