This is a great question. Not because there is a solution to your request. But because this will highlight one of the severe shortcomings of Thinkorswim's language.
There are ZERO string parsing or string formatting tools in the entire Thinkorswim language. Or at least not any which the developers have made available to the general public.
The best we can do is to display SOME of those details on a chart, using the "AddLabel()" method. We can not get the date, but we can the days to expiration.
And because Thinkorswim does not provide any capacity for creating variables with data type of string, we must use the function calls directly within the AddLabel statement. We cannot parse these strings and assign them to individual variables for further processing in other section of the code.
Here is an example script which displays 4 labels on the chart. I have also included a screenshot showing what that looks like when applied to a custom study on a chart.
AddLabel(yes, Concat("Symbol: ", GetUnderlyingSymbol()));
AddLabel(yes, Concat("Days To Exp: ", GetDaysToExpiration()));
AddLabel(yes, Concat("Option Typed: ", if isPut() then "Put" else "Call"));
AddLabel(yes, Concat("Strike $: ", GetStrike()));
Please take note, the chart MUST be set to the ticker symbol of the OPRA code in order for the labels to work. You can NOT simply use the IBM ticker symbol on your chart. And on Thinkorswim, the full OPRA code must be used and it must be prefixed by the '.' as shown in my example screenshot.
There you go. Not sure if any of that is suits your needs. But for everyone that finds this a glaring omission in the Thinkorswim language, I encourage everyone to submit a feature request to have string data types and string parsing tools added to the Thinkorswim language.