LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date-time conventions

Hello All

The LV standards for date assumes that the week number in a year can start with 0 til 53 and the first day in the week is Sunday.

The problem is that in Denmark, there is no week 0, and all weeks starts on Monday (do not ask me why).

The problems sounds only virtually silly, and actually can give heck of the problems.

Now:
Does somebody know the nice way to convert US date convention to this strange Denish convention?

Thanks in advance
Pawel
Message 1 of 40
(6,348 Views)
For the hour, I think it's that :
Put a hour and date command on the front panel (located in the numéric panel).
Then right clic on the command -> properties -> format and precision.
Clic on the advanced mode radio on the botom of the bost, scroll down in the list, and you can see that you have something like "use monday as the first day of the week" (perhaps not exactly that, my labview is in french), with the corresponding code "%W" ...

Is it what you'r looking for???

I search the answer for the date of the week.

Regards.
Message 2 of 40
(6,325 Views)
you can also find the code of date "formating", in labview help, search for "date" then clic on "formating codes" (translate from french, so, the test can be différent..."
You have an array with all the codes.

Regards
0 Kudos
Message 3 of 40
(6,322 Views)
Thanks madness,

It is indeed a part of my problem. The other part is the week number. Today e.g. we have 2004-12-09, which by LV is reported as week 49. In Denmark this is a week 50th, and no year can have week 0. I need to find a trick for that as well.

Thanks a lot
Pawel
0 Kudos
Message 4 of 40
(6,316 Views)
Perhaps you can do something like : week+1 opération.
Do do that you can fix a constant for the date equal to the first week.
Then you do the current date minus the constant date (week1)

Is it OK for you?
Does the answer correspond to your needs?

Regards.


Please rate my answer.
0 Kudos
Message 5 of 40
(6,310 Views)
ARf, sorry, it seems not to work.
I look for the way to do that, but go to lunch for the moment ;-).

See you soon, with the answer I hope.
0 Kudos
Message 6 of 40
(6,309 Views)
It does not work. The logic is more complicated than that. E.g. the week zero (US) in year 2005 is week 53 in denmark :).

cheers
Pawel
0 Kudos
Message 7 of 40
(6,306 Views)
Pawel, I think I have find the solution.

Please find hereafter the vi that give you the week of the day in "danish day format" 😉
I do : if the number of day is<7 and the day of today is not "monday" (in french lundi), then put 53 for the week.
If not, put the normal week.
Can you check the vi.
BE CAREFULL : the day Monday is written in french. Please translate it to the language of your labview.

Tell me if it is working.


Regards.



Please rate my answer.
0 Kudos
Message 8 of 40
(6,301 Views)
the danish date vi
0 Kudos
Message 9 of 40
(6,300 Views)
Nops...
January 03-06 is the week 1 in Denamark. It is shown as 53 in your vi.

Listen, I will not use weeks any more in my application. So thatnks for help, I will go for a standard dates.

cheers
Pawel
0 Kudos
Message 10 of 40
(6,128 Views)