Documentation > Services API > ServicesPostInput > SetDateTime(PostInputContext,String,Boolean)
SetDateTime
Accepts an asset and a fieldname, overloads for panel entry and panel entry fieldname looks for showdatetime fields in input form and saves them to a consolodated field with the name fieldname. Saves the fields in a consolodated datetime field that can be used in output and for sorting in filter and file lists
public System.Void SetDateTime(PostInputContext,String,Boolean)
Parameters
Name | Description | Type |
---|---|---|
context | Current context | CrownPeak.CMSAPI.PostInputContext |
fieldName | Field name that was used for ServicesInput.ShowDateTime() | System.String |
convertToUTC | If true, converts from user time to UTC for parity with VB's showSelectGMT | System.Boolean |
Code Example
C#
Sample:
ServicesPostInput.SetDateTime(context, "Date_Time");