Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've got two variables:
LET vDashDate = Date(Today()-1,);
LET vDashMonthYear =Month('$(vDashDate)') & ' ' & Year('$(vDashDate)');
Unfortunately for vDashMonthYear instead of reading to be =Month('$(vDashDate)') & ' ' & Year('$(vDashDate)') my load script replaces the vDashDate with the actual date not the variable. How can I fix this so vDashMonthYear is dynamic?
Maybe like this?
LET vDashDate = 'Date(Today()-1,)';
LET vDashMonthYear = '=Month($' & '(vDashDate)) & ' & chr(39) & ' ' & chr(39) & ' & Year($' & '(vDashDate))';
I don't know where you'll be using vDashMonthYear so depending on the context you may have to drop the initial '=' from the right hand part of the second LET statement.
Peter
May be this:
LET vDashDate = Date(Today()-1);
LET vDashMonthYear = '=Month($' & '(vDashDate)) & ' Chr(39) & ' ' & Chr(39) & Year($' & '(vDashDate))';
Why can't you just write this straight into the variable rather than do it in the script?
Otherwise you'll need to add quotes etc. as per Sunny's reply
You can write it as
LET vDashDate = Date(Today()-1);
LET vDashMonthYear = Month(Date(Today()-1)) & ' ' & Year(Date(Today()-1));
That's not working.
I have done as a work-around but it's not a good practise.
No the second variable must change is I change the first.
Maybe like this?
LET vDashDate = 'Date(Today()-1,)';
LET vDashMonthYear = '=Month($' & '(vDashDate)) & ' & chr(39) & ' ' & chr(39) & ' & Year($' & '(vDashDate))';
I don't know where you'll be using vDashMonthYear so depending on the context you may have to drop the initial '=' from the right hand part of the second LET statement.
Peter