How to use Duration ,Time and Date function in XPath using Xml

In this article I will explain the duration,time and date functions in XPath.
  • 2705

Introduction

In this article I will explain you the functions on Date, Time and Duration. Some of these functions are given in the following table.

Name Description
dateTime(date,time) This function converts the arguments/parameters in a date and a time.
year-from-dateTime(dateTime) This function takes a dateTime and return the year(integer value) of that datetime.
month-from-dateTime(dateTime) This function takes a dateTime and return the month(inteder value like 01) of that datetime.
day-from-dateTime(datetime) This function is used to return the day(integer value) from the datetime.
hours-from-dateTime(datetime) This function can be used to return the hour from the time that we give in the argument datetime.
minutes-from-dateTime(datetime) This function can be used to return the minutes from the time that we give in the argument datetime.
second-from-dateTime(datetime) This function can be used to return the seconds from the time that we give in the argument datetime.
year-from-date(date) This function can be used to take the date as a argument and return the year from that date in integer.
month-from-date(date) This function can be used to take the date as a argument and return the month from that date in integer.
day-from-date(date) This function can be used to take the date as a argument and return the day from that date in integer.
hours-from-time(time) This function can be used to take the time as a argument and return the hours from that date.
minutes-from-time(time) This function can be used to take the time as a argument and return the minutes from that date.
seconds-from-time(time) This function can be used to take the time as a argument and return the seconds from that date.
year-from-durations(datetimedur) This function can be used to take the datetime duration as a argument and return the year according to it.
months-from-duration(datetimedur) This function can be used to take the datetime duration as a argument and return the months according to it.
day-from-duration(datetimedur) This function can be used to take the datetime duration as a argument and return the day according to it.
hour-from-duration(datetimedur) This function can be used to take the datetime duration as a argument and return the hour according to it.
minutes-from-duration(datetimedur) This function can be used to take the datetime duration as a argument and return the minutes according to it.
seconds-from-duration(datetimedur) This function can be used to take the datetime duration as a argument and return the seconds according to it.

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.