IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

get day of week as integer Options · View
abhadoria
Posted: Monday, December 18, 2017 1:15:19 PM
Rank: Newbie

Joined: 12/18/2017
Posts: 4
Hi, I have a change to do wherein I need the day of the date that is being entered as a integer where a Monday would be 1 and neding with Sunday as 7.

I am using xslt verison 1.0.

Example - date is in format mm-dd-yyyy. consider date as 12-18-2017.

The day is Monday and hence the result should be 1.

any help is appreciated
K101
Posted: Friday, December 22, 2017 9:19:07 AM
Rank: Advanced Member

Joined: 2/27/2009
Posts: 558
The XSLT Standard Library offers a calculate-day-of-the-week function you could use. XSLT 1.0 offers no standard way to access the current date, however, so you'll have to search the web to find a method suitable to your environment, or make the system generating the XML upon which the XSLT 1.0 will operate include the current date in the XML.

Far better it would be simply to migrate to XSLT 2.0. There's always a way.
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.