You need to sign in to do that
Don't have an account?

Question - Date/Time formatting in Salesforce
Hi, We have a automatic way of creating our custom object of Product setups through our opportunity record, which was custom developed.
When this occurs a expiration date is automatically brought in from our opportunity contract end date.
I noticed that the time is always set to 12:00 AM ,but when I create a Product setup manually through the account record the expiration date time field always shows the time is at this moment.
Is this a salesforce standard functionality that it would always default to 12:00 AM no matter what the date is? Or would this be somewhere in their triggers/apex class or code? I am trying to find anything written out, but having no luck so wanted to know if was standard practice.
I found one s-control code that said this?
'expirationDate="'+ expDate.format("yyyy-mm-dd HH:MM:ss")+'" '+
Thanks
If you are copying over a "Date" from Opportunity, it will default to 12am as Date type fields don't have a time associated with it. If you are copying from a "Datetime" field, the time should get carried over.
All Answers
If you are copying over a "Date" from Opportunity, it will default to 12am as Date type fields don't have a time associated with it. If you are copying from a "Datetime" field, the time should get carried over.
Thank you so much for your quick response. I saw we do have a regular date field and it was set this way in our opportunity trigger, which cannot be changed
thx