You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

If you want to display dateCreated and dateModified based on user's timezone, you may use BeanShell Formatter on the date column.

Use this Java code in the formatter.

import java.text.SimpleDateFormat;
import org.joget.commons.util.TimeZoneUtil;
import java.util.Date;
import org.joget.apps.app.service.AppUtil;

String pattern = "yyyy-MM-dd HH:mm:ss.S";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
Date date = simpleDateFormat.parse(value);
value = TimeZoneUtil.convertToTimeZone(date, null, AppUtil.getAppDateFormat());

return value;
  • No labels