Jump to content
Server Maintenance This Week. ×

FileMaker Time Stamps


Go to solution Solved by doughemi,

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

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Solution

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
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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 )

Link to comment
Share on other sites

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