Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

FileMaker Time Stamps


Go to solution Solved by doughemi,

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

Recommended Posts

Posted

Hello,

 

I'm currently writing an XML SOAP Request and it requires the time / date to be formatted in a certain way and I'm just wondering if FileMaker can format it like I require.


I require it to be formatted like this:

 

2013-04-26T10:10:00

 

I need the T to stay too...

 

Thanks,


Scott

Posted

A calculation:

Let(

ts = YourTimestampField;//Substitute the name of your timestamp field here

Year(ts) & "-" & Month(ts) & "-" & Day(ts) & "T" & Hour(ts) & ":" & Minute(ts) & ":" & Second(ts)

)

 

If you don't have a timestamp field, create one with the calculation Timestamp( Date; Time)

  • Like 1
  • Solution
Posted

Good catch, David.  Making the formula

 

 

Let(

ts = YourTimestampField;//Substitute the name of your timestamp field here

Year(ts) & "-" & Right(0 & Month(ts); 2) & "-" & Right(0 & Day(ts); 2) & "T" & Right(0 &Hour(ts);2) & ":" & Right(0 & Minute(ts);2) & ":" & Right(0 &Second(ts);2)

)

  • Like 1
Posted

Hey guys, thanks for the reply...

 

The only problem I've got is the month is missing a 0 for instance.

 

2013-04-01 and the calculation show 2013-4-01T14:00:00

 

Is there away I can put a 0 first?

Posted

Make sure that the highlighted part is copied correctly

 

Year(ts) & "-" & Right(0 & Month(ts); 2) & "-" & Right(0 & Day(ts); 2) & "T" & Right(0 &Hour(ts);2) & ":" & Right(0 & Minute(ts);2) & ":" & Right(0 &Second(ts);2)

Posted

The 0 should be in quotes because it is text... it might work the way it is now, but that could change in the future.

 

Right( "0" & Month( ts ) ; 2 )

This topic is 4255 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.