LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format Date/Time String Function

I found some odd behaviour in LabView 2010 Format Date/Time String Function. It does return wrong 07 week number, when it should today (20.2.2013) retun week 08. Time format string is "%W%y". Has somebody found solution how to go around the problem?

 

 

Download All
0 Kudos
Message 1 of 4
(3,476 Views)

It is doing what it says it will do, please read the help: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/string/format-codes-for-the-time-fo...

 

Excerpt from the help:

<%W> week number of the year (00–53), with the first Monday as the first day of week one; 00 represents the first week

CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 4
(3,468 Views)

help says : 

<%W> week number of the year (00–53), with the first Monday as the first day of week one; 00 represents the first week

 

EDIT :

Damn a second too late Smiley Sad


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 3 of 4
(3,465 Views)

Be advised that the %W and %w date formatters in LabVIEW are not ISO-8601 compliant.

 

https://forums.ni.com/t5/Example-Code/ISO-8601-compliant-date-time-string-in-LabVIEW/ta-p/3507833

 

There is a link in this example to a thread containing info about calculating an ISO-80601 week number.

 

 

Message 4 of 4
(3,441 Views)