function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
raggifjraggifj 

Workflow field update formula problems

Hi there.

Here in Iceland we have a special social security number in the format of example; 1802852069.
The first 6 numbers are date born as in DD MM YY. I am creating a formula which automatically puts this in value into the birthday field using workflow and field update.

The code that I use is - kennitala = social secuirty number
Code:
DATE (MID (Kennitala__c , 5 , 2 )+1900 , MID(Kennitala__c , 3 , 2) , MID(Kennitala__c ,1,2))

the error that i get is; Error: Incorrect parameter for function +(). Expected Number, Date, DateTime, received Text

this field kennitala is a text field. I tried putting Value in front of the MID's but that didn't work.

I used this code to create a formula field and that worked, so just don't understand why it dosn't in the field update.

Any help will be well appriciated
Thanks in advance
Ragnar Fjölnisson
 




Message Edited by raggifj on 04-11-2008 09:26 AM
NPMNPM

The + is assumed to be for a numeric calculation and you may be having an issue mixing text and numeric.

Rather than adding (+) 1900 for the year you may want to try concatenating (using &) the 19 and the year characters.  You may need to play with the syntax, I do not know if the " " are needed.

DATE ("19" & MID (Kennitala__c , 5 , 2 ), MID(Kennitala__c , 3 , 2) , MID(Kennitala__c ,1,2))