Some time back I added some code with help from this forum to add a couple of extra fields into the bulk_user_download.php file and format the date as YYYY-MM-DD. Now I need to do something similar but with some fields from the extended user profile fields (eg custom one you can add). They are in another table linked to users. The existing code does extract the fields but the date format is not what I need.
In the code attached, I think it needs to go in somewhere around lines 72-76 and basically say if the field format = date then format as YYYY-MM-DD. (I'd rather do it this way than individually naming the date fields).
I just need some help to fix this little part, my php skills are almost non-existent. thanks
Attached are the MoodleUsers.csv - a sample extract file (the column named CompletedAdmin20 shows the date but not in the format I want). Also attached is the php file that creates this extract.