No announcement yet.

[SOLVED] adding from another form

  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] adding from another form

    using SC 6.
    I use a Form to update some fields from another table (not calendar table)
    Now I added some Fields to that form: date, time

    Now I put some code to ajax (on after update) :
    selcting calendar table
    adding some value to title
    adding some value to description
    using "date"-field from form for "start_date" from calendar-table
    and so on.

    internal format of the date-field is AAAA-MM-DD. I also tried AAAAMMDD
    So that form should automatic insert into calendar-table a new entry after updating the entry of the form-table.
    The calendar-table is the one the calendar-app did build.

    It doesnt work. There is a new entry, but with a wrong start_date value. When I use "29 10 2013" in the form, the calendar-table has "2013-02-29"
    When I use something like "30 11 2013" there is a SQL-fail.
    looks like it takes the "0" from "10" to use it as the "02" or, in the other case, the "11" and tries to store "2013-13-29" (which fails of course)

    So i wonder which "internal format" is used for the calendar? The Database stores dates this way: YYYY-MM-DD
    But this doesnt work as you can see.
    My normal calendar-app works. I tried to make a new form-app from calendar-table and it works too. BUT in that new calendar-form, there isnt a possibility to see internal format.

    In my original-form-app with the added date-field there IS a possibilty to see / change "internal format" but nothing i tried worked.

    Any Idea anyone?
    Last edited by nina_sorensen; 10-28-2013, 06:22 AM. Reason: corrections

  • #2
    aducom did find a solution in the german-part of this forum:
    it was the "local setting". must be turned off. I thought this was a setting for the way SC displays the date - not for internal storage.

    now it works
    Thank you, aducom!


    • #3

      Credits to Albert Drent (aducom).