Microsoft
Software
Hardware
Network
Question : Xquery assign datetime variable
hi,
i have the following code
current-time() + xs:dayTimeDuration(string(
concat('PT
', $i, 'M')))
which uses the current-time() function from xquery and adds mins to it.
let's say i want to subsitute the current-time() with a date time in string format
25/12/2006 15:00:30
how do i go about doing it?
thanks.
Answer : Xquery assign datetime variable
given that the time value lands in a variable $time
let $time := "25/12/2006 15:00:30"
you can cast to the dataTime format like this
xs:dateTime(replace($time,
'(\d+)/(\d+)/(\d+)\s+(.*)$
', '$3-$2-$1T$4'))
Random Solutions
Will Pandora on iPhone empty my wallet?
Subtitles and downloaded movie files
How to create stack
sql server stored procedure syntax question
Maxtor DiamondMax Plus 8 as External Drive
Install Office Pro 2003 and 2007
Iphone doubt - Syncing through iTunes
Issues with Kerberos and Pam Authentication against Active Directory.
Password Recovery Procedure for Catalyst 4006 Switch
Upgrading our domain from Server + exchange 2000 to 2003 or later.