How to create a datetime input in

I can't find in the documentation what possible values can be assigned to the type attribute of the element that sits in in a table definition. Only one I could find is "xs:string", but the documentation says almost nothing about this attribute, let alone list the possible values for it.

Specifically, I need a datetime input. I tried type="xs:dateTime" but the input is coming in as a regular string (as proven by doing y.log(typeof variablename); in the execute blob)

3 Replies
  • Oh cute, anything between angle brackets is thrown away while posting a question in a forum specific to XML-based technology. Nice going! Where's the edit button??

  • We don't have an edit button, but we're working on it.

    To format, use Markdown: http://daringfireball.net/projects/markdown/basics

  • Thanks, duzins, that would be great.

    Now, about the problem. Can I force an input to be a datetime?

    It seems I'm having the same problem for booleans: I try "xs:Boolean", but a 0 or a 1 is coming is as a number, not as a boolean. YQL strangely doesn't understand true or false as keywords, so 1 and 0 seem most logical. But a user could input anything, and I'd like YQL to catch that as early as possible.

    For example:

    select * from mytable where booleanvalue=1

    Now booleanvalue is coming is as the number 1, where I expect (and want) it to come in as true. A user could try and break things by doing:

    select * from mytable where booleanvalue="good day sir"

    Or anything else potentially malicious. Now, a string is truthy, but it's safer to only allow boolean values for boolean inputs.

    Now, how is this done? And, if this is possible at all, please update the documentation, because it's not there.


Recent Posts

in YQL