DateFormula

mrigyamrigya Member Posts: 124
if (dummyduedate='') then
dummyduedate:=30D;

if dateformula type of variable is found blank then it should assign value 30days in the variable.pls help me how can i do this.

Thanks
Vivek

Comments

  • garakgarak Member Posts: 3,263
    if (format(VarDateFormula)) = '') then
      VarDateFormula := 30D;
    

    REgards
    Do you make it right, it works too!
  • mrigyamrigya Member Posts: 124
    When i have used the code then system generate the eror.
    error is :=There is an error in a constant.
  • BBlueBBlue Member Posts: 90
    IF (FORMAT(dummyduedate) = '') then 
      EVALUATE(dummyduedate,'30D');
    
    //Bogdan
  • mrigyamrigya Member Posts: 124
    How to add the dateformula variable in date variable.
    Date variable = Duedaydate
    Date variable=GateEntryDate
    DateFormula=dummyduedate
    Duedaydate:= CALCDATE(dummyduedate,GateEntryDate);
  • BBlueBBlue Member Posts: 90
    Duedaydate:= CALCDATE(dummyduedate,GateEntryDate);

    Doesn't work the above? What is your question?
    //Bogdan
  • ptech5443ptech5443 Member Posts: 28
    ViVek,

    Here is an example of the date being blank and setting it to 30 Days from Computer date using TODAY. Hope this helps.

    IF (dummyduedate = 0D) then //IF date is zero then
    dummyduedate := CALCDATE('+30D',TODAY); //Add 30 Days to Today
  • garakgarak Member Posts: 3,263
    oh, misunderstood. You doesn't have a DateFormula Variable, you have a Date Variable and you will calculate this.

    so use the
    NewDate := calcdate('<EXPRESION>',DATE);
    
    function
    Do you make it right, it works too!
Sign In or Register to comment.