Jump to content
Server Maintenance This Week. ×

Convert Odd Timestamp to Date


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

Recommended Posts

I'm hoping someone can help me...  I'm trying to convert the following Timestamp to Date.  The timestamp format is: 2017-10-30T14:47:12-06:00 .  I've tried to simply use the Left function to make it 2017-10-30, but I still can't convert that to a regular date.  

Any advice?  Thank you!

Link to comment
Share on other sites

Hi JT

You could also use the Let Function, I like it because it is easier to read.

Let ( [
	~ts = yourTimeStampField
];
	Date ( Middle ( ~ts ; 6 ; 2 ) ; Middle ( ~ts ; 9 ; 2 ) ; Left ( ~ts ; 4 )
 ))

You can also just use the Date Function

Date ( 
Middle ( yourTSfield ; 6 ; 2 ) ; 
Middle ( yourTSfield ; 9 ; 2 ) ; 
Left ( yourTSfield ; 4 ) 
)

Be sure your Calculation result is a DATE.

BYW, this is the CF I was thinking of.

http://www.briandunning.com/cf/1526

Edited by Lee Smith
added the CF link and Date Function
Link to comment
Share on other sites

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