#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    1
    Rep Power
    0

    Question Firebird_ Formular period of employment - error


    Hey dudes,

    Im trying to creat a view to show the period of employment per Member, shown in year, month and days.

    A part of the Month-Formular shown an error:

    Formular:
    Code:
    extract(day from (dateadd(month,datediff(month from -1 to iif(t4.TE is null, t2.EIT, t4.TE)),-1)))
    Error:
    Specified EXTRACT part does not exist in input datatype
    Does anybody knows a solution or has an alternative formular for the period of employment per member?

    thanks in advance!

    Erik

    P.s.: Sorry for my english :-)
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    19
    Rep Power
    0
    The question I would ask is which one are you trying to show? Are you trying to show years or months or days?

    If your trying to combine it you will have problems (just think of trying to depict the year when you have a leap year during it to mess up the calculation).

    If you stick to one format it's a lot easier.

    Normally (from what I've seen) HR departments want it in one form or another (year / month / day). If you give it in months then it is easier to calculate for legal requirements (assume 12 months = 1 year then you can say that 43 months is 3 years and 7 months).

    That way you can get it with the datediff function.

    As to the null start date, if it was me I would ask for user input to make a default value that would be used and then make the field not null.

IMN logo majestic logo threadwatch logo seochat tools logo