Can the year be copied out of a date field to another field

Anonymous
Not applicable

Can the year be copied out of a date field to another field

Is there a way to copy just the year portion of a date field, to another field (like an integer field)? I have data coming in through an integration, as opposed to a form, and need to separate the year out of a date field.
Tags (1)
4 REPLIES 4
Anonymous
Not applicable

Re: Can the year be copied out of a date field to another field

It might be easier to extract that portion of the field prior to inserting the record. What are you integrating with?
Anonymous
Not applicable

Re: Can the year be copied out of a date field to another field

Non Salesforce. Required Custom development. 
Anonymous
Not applicable

Re: Can the year be copied out of a date field to another field

Depending on how many years you are trying to cover, you could create a smart list that is triggered upon lead creation. Then, in the flow step use the Change Data Value Flow to populate the year field you want to fill based on the criteria that the original field contains that year. Does that make sense?
Anonymous
Not applicable

Re: Can the year be copied out of a date field to another field

Javascript could do this if the date is being passed to your form. You could have a hidden field and use JS to parse the year from the data and insert it on submit.