You need to sign in to do that
Don't have an account?
vijendahr k
date format validaion in apex trigger
hello all,
i want to validate date format by using apex in trigger. currnly date is comming from java callout, need to check they are sendig valid date or not before save record in salesforce.
Thanks Advance
i want to validate date format by using apex in trigger. currnly date is comming from java callout, need to check they are sendig valid date or not before save record in salesforce.
Thanks Advance
date format should is : 2015-15-10 12:03:00.000 i am getting it as string.
if date format comes except any other format date condition must fail.
condition 1:
if(clb.StartTime__c == null || check date format or not )
{
msg ='Start Time is unknown or out-of-range value'
}
condition 2: StartTime__c and EndTime__c both are in string format
need to check now
if(clb.StartTime__c <clb.EndTime__c ) // need to covert EndTime__c and endTime__c , verify condition in datetime format.
msg= starttime greter than end time
how can achive these 2 contitions
Thanks advance :)