In the dataset, how can I extract data for current_date in quicksight to return only the date without timestamp? I tried using now() and CURRENT_DATE withformatDate and parseDate but it throws a SQL error
time frame required: Current_Date - 180 to Current_Date.
@Tanisha_Shetty - It seems you are using SQL syntax. In that case you have to stick to the underlying database’s SQL syntax. What @Max suggested is to use the native QuickSight function in the calculated columns and NOT in the Custom SQL query. If you are unable to do it in SQL, please let us know the database type and we can try to provide you the code to get what you are looking for. Hope this helps!
Thanks for the clarification. Yes, it is failing at the custom SQL level. I tried it via SQL code as well and it fails. I’m using Redshift database type.
@Tanisha_Shetty - Thanks for the confirmation. Given that you are trying to extract only the date portion from a timestamp, did you try the TRUNC function as documented in the following link ? Let me know if that works for you!