Wednesday, 24 June 2015

Generate file name with current date and time(CSV or Textfile)
Below code will be useful


dateTime = strfmt("%1 %2",date2str(systemdateget(),321,2,0,2,0,4,dateflags::none),time2str(timenow(),Timeseparator::Colon,timeformat::hour24));
Date getting one day less in HCMEmploymentEmployee table because of the timezone.
Following syntax will resolve this issue.

probationDate = DateTimeUtil::date(DateTimeUtil::applyTimeZoneoffset (hcmEmploymentEmployee.ProbationEndDate, DateTimeUtil::getUserPreferredTimeZone()));