entry date and split save entire field on database

Hi all,
i’am beginner on scriptcase. i have a problem :

I Have table with field
date_transaction : date
date_day : integer
month_ : integer
year_ : integer
remark : string

on form scriptcase, i need input
date_transaction : 12/31/2014
remark : operational start
(on scriptcase already done)

but, on database i need this record :
date_transaction : 12/31/2014
date_day : 31
month_ : 12
year_ : 2014
remark : operational start

how can, i set form SC to automatic split data input to record field database

Regards
Iwan Setiawan

By adding php code to the onbeforeinsert, onbeforeupdate or onvalidate event. Remove your calculated fields from the form and in the event you can fill these fields by your date. Use the {field} notation. I.e.

onvalidate:
{date_day} = date(“m”,strtotime({date_transaction}); // might be wrong as I’m not sure if the field is in correct format, but you can find out.
etc.

you can use sc_group_concat (big thans to jsb) to display, but why you don’t use one date field? you can simply chose to make the format you want from the field properites

Albert! we were writing at the same time :smiley:

thanks all for your suggestion, i will try to do.