Date Format

Description

The DateFormat operation allows building a date string from parts in the Date structure

Version

2011-02-02

URI

REST URI [POST]:
 /v11.02/Date.svc/Format?SessionId={SessionId}

Content-Type: Application/xml

Example

Request POST
http://wsdev.onegreatfamily.com/v11.02/Date.svc/Format?SessionId=113434515134543151134
Request Headers
Content-Type: Application/xml
Request Payload
<Date xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data" 
  <BC>false</BC>
  <DateType>DATE_RANGE_BETWEEN</DateType>
  <Day>0</Day>
  <JulianDay>0</JulianDay>
  <Month>0</Month>
  <RangeBeginBC>true</RangeBeginBC>
  <RangeBeginDay>21</RangeBeginDay>
  <RangeBeginMonth>5</RangeBeginMonth>
  <RangeBeginYear>2004</RangeBeginYear>
  <RangeEndBC>true</RangeEndBC>
  <RangeEndDay>31</RangeEndDay>
  <RangeEndMonth>5</RangeEndMonth>
  <RangeEndYear>2004</RangeEndYear>
  <RequestedDate>s</RequestedDate>
  <StandardizedDate>s</StandardizedDate>
  <Year>0</Year>
</Date>
Success Response Payload
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">BET 21 MAY 2004 B.C. AND 31 MAY 2004 B.C.</string>
 Fault Response Payload
<RestFault xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<ErrorCode>551</ErrorCode>
	<FaultMessage>An unhandled exception has occurred</FaultMessage>
</RestFault>

 

Query String Parameters

Name Description Required

SessionId

The current session Id

Type: string

Default: None

Yes

POST Payload

Name Description Required
date

The Date  request aggregate.

Type: Date

Default: None

Constraints: Must be a valid Date aggregate.

Yes

Response Elements

Name Description

date

This operation returns a standardized date as a string

Type: string

HTTP Status Code

The Web Server returns a status code which indicates if the operation was successful. Anything other than 200 should be regarded as a failure.

HTTP Status Code of 417

The Web Server threw an exception and contains a RestFault aggregate. Retrieve the RestFault from the Webexception response property.