Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What is the difference between the date and date# functions and the timestamp and timestamp# functions?
I want to display just the year of a given date. How would I do that if I'm receiving data that looks like 05-25-2010 10:05? I am using the following expression but it doesn't work : Year(Date(Timestamp#([Last Updated],'MM/DD/YYYY hh:mm')))
Thank you
Date takes a number, Date# takes a string (I assume it is the same for Timestamp). Timestamp and Date both give you datetime type values. In your expression, you need to get rid of the Date function as Timestamp is already (kind of) a date.
Year(Timestamp#([Last Updated],'MM/DD/YYYY hh:mm'))
What format is Last Updated in? According to the format example given, you would want:
Year(Timestamp#([Last Updated],'MM-DD-YYYY hh:mm'))
it is not quite true. You can use date('1/1/2001') and date#(39862). The difference is that date function returns a dual value with string and number implementation of the date. And # function tries to interpret the input parameter as a date and return a string or a number according to input parameter.