Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

Updated Wiki: $().SPServices.SPConvertDateToISO

$
0
0

Function

$().SPServices.SPListNameFromUrl

Certification

Certified for SharePoint 2007Certified for SharePoint 2010

Functionality

This utility function convert a JavaScript date to the ISO 8601 format required by SharePoint to update list items.

Syntax

$().SPServices.SPConvertDateToISO({
   dateToConvert: new Date(),
   dateOffset: "-05:00"
});

Example

var thisDate = $().SPServices.SPConvertDateToISO();

Available Options

dateToConvert
The JavaScript date we'd like to convert. If no date is passed, the function returns the current date/time.

dateOffset
The time zone offset requested. Default is EST.

Returns

A string date in ISO format, e.g., "2013-05-08T01:20:29Z-05:00".


Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>