I have date and I want make Calculate (hidden value) to convert the date to number like:
11-3-2018 to 43170
Because I need make unique number like: (iraq43170) Iraq is site.
My plan is:
concat(#form/site_h, #form/date_dob)
But it give me (iraq11-3-2018) i need the result to be (iraq43170).
Would it be possible to wrap your date value in an int() function?
So, one option would be something like:
concat(#form/site_h, int(#form/date_dob))
Or alternatively, you could save the date in a hidden value using int(#form/date_dob) then reference it later in the second hidden value you are creating.
thank you for reply.
I tested it, and it give me the different number : 17067, and I need to give me 43176.
When I export the data it give me like: Iraq43176.
Please see the image in attache:
You can adjust the dates coming out of CommCare by adding the relative number of dates (which you can find by converting the date one time. ie: int(date("1970-1-1")))