September 15, 20169 yr I need to get the Current Time in UTC and reformat it to HH:mm:ssZ I was thinking that I need to use Get ( CurrentTimeUTCMilliseconds ) Any tips? Thanks
September 15, 20169 yr Did you look at Brian Dunning’s site for a Custom Function? I kind of remember one for this. http://www.briandunning.com/filemaker-custom-functions/recentlist.php
September 15, 20169 yr Yes, that's correct. Formatting is done in the Inspector palette. Tips? Well, if you have a field holding the offset, then you can calc the local time. http://www.filemaker.com/help/13/fmp/en/html/func_ref2.32.27.html
September 15, 20169 yr Author 7 minutes ago, bcooney said: Yes, that's correct. Formatting is done in the Inspector palette. Tips? Well, if you have a field holding the offset, then you can calc the local time. http://www.filemaker.com/help/13/fmp/en/html/func_ref2.32.27.html Thisbeing used when I'm exporting XML so currently it's a set field calc that is Global.. Not being used for any layout. The issue with having a field to hold the offset is that would need to be changed based on the Daylight saving. The Get ( CurrentTimeUTCMilliseconds ) knows this info.. Just trying to get this info into a Time format.
September 15, 20169 yr 32 minutes ago, Devin said: Thisbeing used when I'm exporting XML so currently it's a set field calc that is Global. So why don't you set the global field to: Let ( [ s = Int ( Mod ( Get ( CurrentTimeUTCMilliseconds ) ; 86400000 ) / 1000 ) ] ; Time ( 0 ; 0 ; s ) & "Z" ) Note that the global field needs to be a Text field. Or make the global field a Time field, format it as hh:mm:ss with a trailing "Z", and set it to: Mod ( Get ( CurrentTimeUTCMilliseconds ) ; 86400000 ) / 1000 Then make sure you export with the option "Apply current layout’s data formatting to exported data" checked. Edited September 15, 20169 yr by comment
September 15, 20169 yr Author That Worked.. I have no idea what that does.. But it works. Thanks once again Comment..
September 15, 20169 yr 8 minutes ago, Devin said: I have no idea what that does. Well, there are 86.400,000 milliseconds in a 24-hour day. So if you divide the total number of milliseconds since 1/1/0001 by that and take the remainder, you will have the number of milliseconds elapsed since midnight today. Divide that by 1000, and the rest it trivial. Note the edit to my answer above.
Create an account or sign in to comment