Carl Smith Posted November 27, 2008 Share Posted November 27, 2008 I am trying to re-format a timestamp in order to put it into a larger calculation (to compile a file path using variables) and FP is prompting me that there are too many parameters. Have I missed something or am I not able to use the Case function within the Let function? Here is my calculation; Let ( [ $year = GetAsText ( Year ( Get ( CurrentTimeStamp ) ) ); $month = Case( Length (Month ( Get ( CurrentTimeStamp )) = 1; "0" & GetAsText (Month ( Get ( CurrentTimeStamp ))); GetAsText (Month ( Get ( CurrentTimeStamp ) )) ); $day = Case( Length (Day ( Get ( CurrentTimeStamp ) )) = 1; "0" & GetAsText (Day ( Get ( CurrentTimeStamp ) )); GetAsText (Day ( Get ( CurrentTimeStamp ) )) ) $hour = Case( Length (Hour ( Get ( CurrentTimeStamp ))) = 1; "0" & GetAsText (Hour ( Get ( CurrentTimeStamp ) )); GetAsText (Hour ( Get ( CurrentTimeStamp ) )) ) $minute = Case( Length (Minute ( Get ( CurrentTimeStamp ))) = 1; "0" & GetAsText (Minute ( Get ( CurrentTimeStamp ) )); GetAsText (Minute ( Get ( CurrentTimeStamp ) )) ) $seconds = Case( Length (Seconds ( Get ( CurrentTimeStamp ))) = 1; "0" & GetAsText (Seconds ( Get ( CurrentTimeStamp ) )); GetAsText (Seconds ( Get ( CurrentTimeStamp ) )) ) ]; $year & $month & $day & $hour & $minute & $seconds ) Link to comment Share on other sites More sharing options...
2 letter pi Posted November 27, 2008 Share Posted November 27, 2008 :) In your Let statement the 5th line [the one that begins "Length(Month......."] you have three left parentheses and two right parentheses. I don't know if this is all that might be wrong but try it and see. You need to add a right parenthesis [color:red]")" at the end of the line right before the equals sign. (like below) . . Length(Month(Get(Current TimeStamp))[color:red])=1 Link to comment Share on other sites More sharing options...
Raybaudi Posted November 27, 2008 Share Posted November 27, 2008 The calculation is missing also 3 ";" ... Each variable must be separated from the next one with a ";" BTW: this is simpler: Let([ t = Get ( CurrentTimeStamp ) ; $year = Year ( t ) ; $month = Right ( "00" & Month ( t ) ; 2 ) ; $day = Right ( "00" & Day ( t ) ; 2 ) ; $hour = Right ( "00" & Hour ( t ) ; 2 ) ; $minute = Right ( "00" & Minute ( t ) ; 2 ) ; $seconds = Right ( "00" & Seconds ( t ) ; 2 ) ]; $year & $month & $day & $hour & $minute & $seconds ) Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5767 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now