Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5893 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

)

Posted

:) 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

Posted

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

)

This topic is 5893 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.