If you are not very concerned with high speed (aka you can wait for the data to be written to disk), you can just add the "Write to delimited Spreadsheet" to the while loop.
I added comments to the picture below for ONE method of logging until a specified time. The method I show assumes you add a Timestamp control to the Front Panel where the operator is inputting a time in the future when the test will stop. There are many other triggers that can be used to stop the acquisisiton (time after acquisition started, X # of data points, etc).
Kenny