I'm having a few issues with my conditional statements using HubL and HubDB. Basically I've got a table which has Events and Webinars combined. The events are ones which last more than a day, eg. 3 Aug to 5 Aug. The Webinars are one-day events. So what I'm trying to achieve here is to check if the Start Date and the End Date are the same then only display the End Date column, however, if they don't match then display both the Start and End Date columns.
The following scenarios are occurring:
- Even when the Start Date and End Date don't match, it's still displaying the first if condition - When I remove the first if condition, no date is displayed at all
@rnoon-d22 - I'm not entirely sure what you're intention is when you make your comparison on the dates but, if you are looking to check against an exact date/time/second then you shouldn't apply the filter of datetimeformat while making your if statement.
The only reason I can see you getting unwanted results is because you're converting your date to a 24 hour range. For example:
1531826070870 (timestamp converts to July 17, 2018)
then, if I change the milliseconds of the timestamp
1531826070900 (timestamp also converts to July 17, 2018)
So, if I were to check these 2 timestamps against each other after applying the datetimeformat filter, it would eval to TRUE since the result of both falls in the same day, even though the original timestamp is different.
Let us know if that is the case. If not, try adding the pprint filter to both of your dates and we can help you debug further.