stephenjgray
29-05-2013, 15:10
Hi everyone. I am new to thinbasic (which I'm very impressed with), though not new to programming.
With help from the samples I've written myself a program to parse a large .csv file, do a little number crunching and then write out some new files.
One of the new output files has to be in a specific .csv format in order to be loaded correctly into another piece of software.
The csv format required starts with date,time,whatevever,whatever.
I am having trouble with the time format. When I open the .csv (ie in MS Excel) that my thinbasic program creates it shows my time column as type=General, and it shows my times as, for example: 14:30. When I open the .csv that the other piece of software can save itself as an example of the format that it wants to load, then its time column shows as type=Custom, and whilst it shows in the column as, for example: 14:30, in the field at the top of the Excel screen it shows as "2:30:00 PM". So in other words Excel is storing it as some kind of special time format, and this is how it needs to be for the other software to successfully load it.
So my question is: is there a function or something in thinbasic that will allow me to create this second data item in my .csv in this special time format so that the other software can load it?
cheers,
Stephen
With help from the samples I've written myself a program to parse a large .csv file, do a little number crunching and then write out some new files.
One of the new output files has to be in a specific .csv format in order to be loaded correctly into another piece of software.
The csv format required starts with date,time,whatevever,whatever.
I am having trouble with the time format. When I open the .csv (ie in MS Excel) that my thinbasic program creates it shows my time column as type=General, and it shows my times as, for example: 14:30. When I open the .csv that the other piece of software can save itself as an example of the format that it wants to load, then its time column shows as type=Custom, and whilst it shows in the column as, for example: 14:30, in the field at the top of the Excel screen it shows as "2:30:00 PM". So in other words Excel is storing it as some kind of special time format, and this is how it needs to be for the other software to successfully load it.
So my question is: is there a function or something in thinbasic that will allow me to create this second data item in my .csv in this special time format so that the other software can load it?
cheers,
Stephen