static void ShyamDateJob(Args _args) { date currentDate = today(); str strDate; ; strDate= date2Str (currentDate, 321, DateDay::Digits2, DateSeparator::Hyphen, // separator1 DateMonth::Digits2, DateSeparator::Hyphen, // separator2 DateYear::Digits4 ); info("Today is: " + strDate); } /** Sample Infolog output Today is: 2016-07-11 **/
Reference
String to Date
Comments
Post a Comment