Documentation > Services API > ServicesPostInput > SetDateTime(PostInputContext,String,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,String,Boolean)

Parameters

NameDescriptionType
context Current context CrownPeak.CMSAPI.PostInputContext
panelName Name of the panel that contains the fields generated by ServicesInput.ShowDateTime() System.String
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_Panel", "Date_Time");
            
            

Connect with Crownpeak