I have to import a file of new users to FEU and one FEU User Property is a date field (birthday), but FEU won't let me import dates past 1970-01-02.
Is where a work-around so i can import users with birthdays before 1970-01-02?
I've tried different formatting including using Unix Timestamp but to no avail.
I was thinking using a text property for birthday, but i have to calculate an users age in frontend for search purpose, so i'm not sure it's at good idea!
FrontEndUsers import dates into a User Property
Re: FrontEndUsers import dates into a User Property
unix timestamp in a text field should probably be the best option, but you'd have to typecast to integer in the templates for sorting. But that would be my choice.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: FrontEndUsers import dates into a User Property
I think i maybe found a workable work-around;
Create a User Property in FEU and set it as Type Text.
Convert birthdays in the import file to a Unix Timestamp.
Import the users.
Convert the User Property in FEU to Type Date.
My little test sample seems to convert to the correct birthday for the user, but i'll have to do some more testing to be sure.
Create a User Property in FEU and set it as Type Text.
Convert birthdays in the import file to a Unix Timestamp.
Import the users.
Convert the User Property in FEU to Type Date.
My little test sample seems to convert to the correct birthday for the user, but i'll have to do some more testing to be sure.
Re: FrontEndUsers import dates into a User Property
OK! Some further test shows it seems not to matter if the date is imported to a User Property (Type Text) as an Unix Timestamp or like YYYY-MM-DD format.
As soon i convert the User Property (Type Text) to Type Date it looks to output the correct birthdate for the user.
The question now is what is the smartest format to choose?
Will choosing one over another format, paint me into a corner at some point, if i need to search for a users age or birthday?
As soon i convert the User Property (Type Text) to Type Date it looks to output the correct birthdate for the user.
The question now is what is the smartest format to choose?
Will choosing one over another format, paint me into a corner at some point, if i need to search for a users age or birthday?