You guys are awesome! Thanks a lot for all the tips.
Is there a way to return the date values back to actuall dates in an array form?
What’s your use case? What are you trying to do with the array of dates?
I need to separate dates in which a student attended class from the dates in a period (in this case the period is a school term) so to know which actual dates the students were absent from school. I’m using a remove elements array from the array in between dates to remove the dates the student was present at school.
But then the dates are in number form so the user will not be able to tell which dates the particular student missed class. Hence the need to convert them back to normal dates and then display as an inline list against the student
What type of “number form” are you using?
The date number that results from the TRUNC(date) function
I believe that Trunc(Date)
gives you the equivalent of an Excel serialised date value, which is essentially the number of days since Jan 1 1900. There is probably a way to convert that back to a date - maybe an Excel function? (I don’t use Excel).
Personally, if you want to store the dates as numbers, I would suggest something a bit more user friendly. My recommendation would be YYYYMMDD. You can get that with the following math formula:
Year(Date)*10^4
+ Month(Date)*10^2
+ Day(Date)
Converting that back to an actual date value at a later stage is trivial with a Text to Date column.
Also that date format Darren suggested is much more readable, in case you like it enough and don’t need to convert to another form.