Timeline for Getting the year from a Date custom field
Current License: CC BY-SA 3.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 16, 2016 at 2:15 | vote | accept | SfdcBat | ||
Jan 20, 2016 at 17:14 | comment | added | Ratan Paul | Let us continue this discussion in chat. | |
Jan 20, 2016 at 17:12 | comment | added | SfdcBat | I need to use YEAR from pres_date__c to decide what text value will date_text__c get. If YEAR>2010 then date_text__c get "YES' else if YEAR<2010 then date_text__c gets 'NO' | |
Jan 20, 2016 at 17:08 | comment | added | Ratan Paul |
@Rdvsm if you need year from pres_date__c field then why you need date_text__c field ?
|
|
Jan 20, 2016 at 17:06 | comment | added | SfdcBat | I have a field named date_text__c which is a text data type. In this text data type field I am using the formula editor to get the year from pres_date__c as TEXT. I am using the formula editor to set the value of date_text__c. | |
Jan 20, 2016 at 17:04 | comment | added | Ratan Paul |
@Rdvsm pres_date__c date type and your formula field return type is text ?
|
|
Jan 20, 2016 at 17:02 | comment | added | SfdcBat | It is actually a text field type and I am using Formula editor to assign a text there. I tried using TEXT( pres_date__c ), but that too did not work and gave the same error that pres_date__c may not be used in this type of formula | |
Jan 20, 2016 at 17:02 | answer | added | powlo | timeline score: 1 | |
Jan 20, 2016 at 16:59 | comment | added | Ratan Paul | Yes your formula field return type should be integer | |
Jan 20, 2016 at 16:56 | comment | added | Prajith | what is your return type of formula | |
Jan 20, 2016 at 16:49 | comment | added | SfdcBat | Yes I am sure the data type is a date | |
Jan 20, 2016 at 16:41 | history | edited | Ratan Paul | CC BY-SA 3.0 |
added 6 characters in body
|
Jan 20, 2016 at 16:39 | comment | added | SfdcBat | It gave me the same error.. | |
Jan 20, 2016 at 16:36 | comment | added | Ratan Paul |
try YEAR(DATEVALUE(pres_date__c))
|
|
Jan 20, 2016 at 16:34 | history | edited | Ratan Paul | CC BY-SA 3.0 |
added 10 characters in body
|
Jan 20, 2016 at 16:32 | history | asked | SfdcBat | CC BY-SA 3.0 |