Forum Discussion
Convert date in date type, not string
Hi giuliapiazza94 ,
can you try using Cdate function in the expression.
please let me know if you need further support.
Thanks,
Hi, giuliapiazza94
Based on your information, I create a sample Table:
Import to the Report Builder. Then right-click dataset.
In the query designer, you can use expressions to convert strings to date types. For example, if your date string is in the format "dd/MM/yyyy", you can use the following expression:
CONVERT(date, [DateString], 103)
Here, 103 is the style code used for the UK/France date format.
Converted query:
Insert a Table visual and click Run
If you want to use Cdate, you can right click text, select Expression.
Use the following code:
=CDate(Fields!DateString.Value)
Before:
After:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.