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

Date field to Text fields
Hi,
I have date field , suppose i am selecting 4/3/2013 in date field
i have 3 more fields
Date( text)
Month( Picklist)
Year( Text)
i want to auto populate date field value in to these 3 fields by date,month, year
how can i do this, any help will be appriciated
Thanks in Advance.
Banti
Hi Banti,
So if I understand you correctly, you want to select a date and then put the day part in the Date field, set the Month picklist to the month, and set the Year field to the year?
Do you need the Date, Month and Year fields to be editable after the fact, or can they be read only? If they can be read only, you can use formula fields of type Text and set the values to TEXT(DAY(DateField__c)), TEXT(MONTH(DateField__c)), and TEXT(YEAR(DateField__c)). If you wanted to spell out the month instead of showing the number, you could use the following formula instead:
If you need the fields to be editable, you could use a workflow rule with a field update workflow action to set the values of Date and Year to the same formulas above. However, you can't use a formula to set the value of a picklist in a workflow field update; it can only be set to a static value, like "January", so you won't be able to set that without using a trigger. And if you need to do that in a trigger, you'll probably want to set all three fields using the same trigger.
All Answers
Hi Banti,
So if I understand you correctly, you want to select a date and then put the day part in the Date field, set the Month picklist to the month, and set the Year field to the year?
Do you need the Date, Month and Year fields to be editable after the fact, or can they be read only? If they can be read only, you can use formula fields of type Text and set the values to TEXT(DAY(DateField__c)), TEXT(MONTH(DateField__c)), and TEXT(YEAR(DateField__c)). If you wanted to spell out the month instead of showing the number, you could use the following formula instead:
If you need the fields to be editable, you could use a workflow rule with a field update workflow action to set the values of Date and Year to the same formulas above. However, you can't use a formula to set the value of a picklist in a workflow field update; it can only be set to a static value, like "January", so you won't be able to set that without using a trigger. And if you need to do that in a trigger, you'll probably want to set all three fields using the same trigger.
Thank you Shale
KUDOS :)