Date to Datetime - From parameter

  • 1
  • Question
  • Updated 5 years ago
  • Answered
  • (Edited)
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: Old Questions

How to convert the date to datetime value which i am passing as URL parameter before executing the SOQL query? 
Photo of Raj

Raj

  • 442 Points 250 badge 2x thumb

Posted 5 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,228 Points 20k badge 2x thumb
Raj.  I'm not sure what you are trying to do here?  I think your best bet would be using a formula field in Salesforce.  Look at this Success post:  https://success.salesforce.com/answers?id=90630000000grwLAAQ
Photo of Raj

Raj

  • 442 Points 250 badge 2x thumb
Rob..
Lets say I have one URL parameter which is accepts datetime(eg.Startdate). I need to use this url parameter a) as datetime field b) date field. Because Object A.Field1 accepts datetime value and ObjectB.Field2 accepts date field. I am using skuid pages to pull the data from these two obejcts using URL parameter fields. 
Thanks!!
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,228 Points 20k badge 2x thumb
Raj.  I think you will have to create a custom renderer on the date field.  (see a tutorial for custom renderers here: http://help.skuidify.com/m/11720/l/204496-table-component-custom-field-renderers  - note:  This tutorial is for tables,  but field editors operate much the same)

The Snippet you write for the custom renderer can access the Startdate paramater using the javascript syntax:  "skuid.page.params.Startdate"    Once you have that data you can manipulate it to remove the time elements and populate the remaining date field to the page.  

Here is another example of similar manipulation  https://community.skuidify.com/skuid/topics/custom_field_renderer_simple_math

This conversation is no longer open for comments or replies.