This is fairly easy to do with Tableau Prep. See the attached Prep flow file and the included .hyper file for Tableau to check out for your self. A slight modification of this file should work for you for you noting that the filter is set on the N field currently and you may have more values than 1 and 2 for that field.
I also added a full Datetime() field to the output. You will need a creator license for full time use of Prep but I imagine you already have one based on the work you were doing here.
Let us know if you have any questions and I hope this works well for you.