You need to sign in to do that
Don't have an account?
kevinjia1984
How to get today's date in a date type field?
Hi Guys,
I am a newbie. Just want to know how to make a date type field equals to today's date. I have tried objectName.fieldName= today(). but it seems wrong.
Well you can do that by creating a field of type Formula, then choosing the Date type on the following screen. When it comes time to input the formula itself, that's when you can input
TODAY()
Finally put the field on one or more page layouts, and voila.
All Answers
Do you mean you want to set that field via the API, or just show it within the Salesforce.com web app?
I just want to show it within salesforce. Put it in a method with in a Apex class
Well you can do that by creating a field of type Formula, then choosing the Date type on the following screen. When it comes time to input the formula itself, that's when you can input
TODAY()
Finally put the field on one or more page layouts, and voila.