Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 23:38:52 +0000



Post From: Working in SC Spreadsheet with datetime strings from Trade Activity Log

[2024-01-30 22:04:36]
j4ytr4der_ - Posts: 938
I was hoping to do some simple date comparisons in a SC Spreadsheet rather than having to leave SC and go to a Google Sheet just for this. Trouble is, dates in the TAL are provided as a text string in the format "2023-12-15 10:01:36.000", but since they're text values when copied out of the TAL, you cannot do any comparison operations on them.

I thought maybe I could use LEFT() and RIGHT() to parse out the date and times separately, then use DATEVALUE() on the date portions to convert them to actual dates, but DATEVALUE() requires formatting of m/d/YYYY and won't work with the YYYY-m-d formatting that comes out of the TAL.

Short of reformatting all the text strings (at which point this is just plain better to do in an external spreadsheet anyway), is there any way to get datetimes out of the TAL and do a comparison on them in a SC Spreadsheet?