Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Im trying Alt() function in text object but it is giving null in output.
I have 3 different date formats in excel and want to make dates only in one format using alt().
How to do this?
I have attached my qvw file.Please check it .
Thanks in advance.
Text box holds only one value,not individual rows.
try this
=date(Alt(
Date#(MixDate,'MM/DD/YY'),
Date#(MixDate,'MM-DD-YYYY'),
Date#(MixDate,'DD-MM-YYYY')
),'DD-MM-YYYY')
select one date from list box
I think your first argument's date format needs to be adapted to your data set, and an additional Date() function reformats to a common default format:
=Date(
Alt(
Date#(MixDate,'M/DD/YY'),
Date#(MixDate,'MM-DD-YYYY'),
Date#(MixDate,'DD-MM-YYYY')
))
This works in your text box, when you select a single field value.
Hi,
Try this,
=date(Alt(
Date#(MixDate,'MM/DD/YY'),
Date#(MixDate,'MM-DD-YYYY'),
Date#(MixDate,'DD-MM-YYYY')
),'DD-MM-YYYY')
Regards
PFA
Hi,
Alt function will return the valid number representation. in your case all the no format are valid so that is why it will give all the formats based on the selection. you can visualize that as
=concat(Alt( Date#(MixDate,'DD/MM/YY'),
Date#(MixDate,'MM-DD-YYYY'),
Date#(MixDate,'DD-MM-YYYY')
),' ')
USE Date(Alt( Date#(MixDate,'DD/MM/YY'),
Date#(MixDate,'MM-DD-YYYY'),
Date#(MixDate,'DD-MM-YYYY')
))
Thanks Max dreamer .Its working.
Welcome
Regards