You need to sign in to do that
Don't have an account?
vijendahr k
date format validator in if condition
Hello All,
can any one suggest me to verify the pattren like below using date
:2014-09-15 00:00:00
if(ob.Datestring__c == null ||date.valueOf(ob.Datestring__c) != date.valueOf(ob.Datestring__c.datevalue('yyyy/MM/dd') ) )//format('yyyy/MM/dd hh:mm:ss');
{
system.debug('inside lp');
// if(date.valueOf(ob.Datestring__c) == date.parse('yyyy/MM/dd hh:mm:ss')) 2014-09-15 00:00:00
ob.dateformat__c=date.valueOf(ob.Datestring__c);
}
can any one suggest me to verify the pattren like below using date
:2014-09-15 00:00:00
if(ob.Datestring__c == null ||date.valueOf(ob.Datestring__c) != date.valueOf(ob.Datestring__c.datevalue('yyyy/MM/dd') ) )//format('yyyy/MM/dd hh:mm:ss');
{
system.debug('inside lp');
// if(date.valueOf(ob.Datestring__c) == date.parse('yyyy/MM/dd hh:mm:ss')) 2014-09-15 00:00:00
ob.dateformat__c=date.valueOf(ob.Datestring__c);
}