02-20-2013 04:10 AM
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?
02-20-2013
04:28 AM
- last edited on
03-10-2026
11:28 AM
by
Content Cleaner
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 |
02-20-2013 04:29 AM - edited 02-20-2013 04:29 AM
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 ![]()
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
02-20-2013
06:37 AM
- last edited on
03-10-2026
11:29 AM
by
Content Cleaner
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.