02-08-2010 01:49 PM
Ok here's the thing: I'm using get current date/time, I convert it to a string and this string is logged in a CSV file -text-
Next, I built in a feature to plot previously logged data on an XY graph. I use search string to look for time values and convert it back to a timestamp.
Works like a charm.... BUT I noticed when I moved with my VI to another platform for some reason it has a different formatting of the system date/time, this is the case:
My 64 bit:
08:16:48.978 PM 08/02/2010
Someone else's windows 32 bit:
08:25:02,055 08/02/2010
Another issue is that it uses a comma instead of a period for fractional seconds.
So now here's the million dollar question: Where can I change this, preferably within labview? I want it to get date/time in AM PM regardless of platform and use period for fractional seconds.
Thanks!
'
Solved! Go to Solution.
02-08-2010 01:57 PM
i've found that you can adjust Window's notation of time and date by running intl.cpl -region and language settings-
Is there a way to make Labview adjust this automatically?
02-08-2010 02:01 PM
Can you show what code you used? There are quite some date/time to string conversion tools, and each has a different approach to get a system independend string.
Ton
02-08-2010 02:12 PM
Yes absolutely, it is added.
Another request: I'd like to have fractional seconds in my timestamp. Possible?
02-08-2010 02:45 PM
Here is a possibilty, since you use the 'Format Date/Time String' you can use the same format string to scan the timestamp:
The fact that a ',' is used is a bug of LabVIEW and still not fixed. Where do you need the fractional seconds? The timestamp data itself always has full info on the timestamp. Representation (either as string or timestamp indicator) can be made in any way (even timezone independent).
Ton
PS Geinig om nederlands commentaar te zien
02-08-2010 03:52 PM - edited 02-08-2010 03:54 PM
_Faust wrote:
Another issue is that it uses a comma instead of a period for fractional seconds.
So now here's the million dollar question: Where can I change this, preferably within labview? I want it to get date/time in AM PM regardless of platform and use period for fractional seconds.
Thanks!
'
I really have no idea if that could be the case, but maybe it's worth giving it a chance. In LabVIEW try going to Tools -> Options... -> Front Panel -> General -> Use localized decimal point* and check/uncheck it.
*Changes to marked options will take effect the next time you start LabVIEW.
Maybe on the other system where you have loaded yor program the local settings are different.
02-09-2010 01:51 AM
Ton,
On my 64 bit system, which is configured as international, I do get fractional seconds with a period as delimiter.
If you're running windows 7 -or vista- you can change the comma to a period in the region settings and then click on advanced. I think that setting has effect on labview's time formating. I will double check on that though.
Thank you for your help. I already checked your website on the Dutch Labview Users Group.
02-09-2010 02:00 AM
Ton,
Als je dit nog leest: Ik heb je code-capturing-tool gedownload. Ik zie dat je een enorme professional bent, en ik zou
graag eens in contact komen, wellicht dat ik nog wat kan leren. Je kan mailen naar felix <at> arthecom punt nl.
Ik zelf schrijf programmatuur voor de universiteit die pilots en dergelijke aan moet sturen. Ben nog redelijk n00b en zou
graag van professionals leren.
Fijne dag nog.