Forum Discussion
JSJB
2 years agoHelper I
Telling if date format includes time
Hello, I am developing a custom visual that shows given columns of data and allows some data entry as well. I am basing this datagrid on Material UI's datagrid component. However, this compone...
JSJB
2 years agoHelper I
Hello lbendlin, thank you for your reply 🙂
I think your suggestion is good, but I am worried about performance of it. Because, to determine if something is a date format, we would theoretically need to evaluate every single value, would we not? If we check the first value and find it's a date, we can't exclude the possibility that the value after that may be datetime (and so on and so on).
Either way, I've thought about it and believe that it's best to consider all date measures passed to be datetime. I will just include an option for users to specify if they want it to be date after the fact (while still using their formatting no matter what it is). I think this gives the end-user more flexibility.
Thanks for your help!