40
Views
2
Comments
TextToDate conversion in Aggregate
Application Type
Traditional Web

I have one column in a table, which contains a date and time value. here the column data type is text.

Date value like : 2024-03-18_18:19:01

I need to filter the current date values in that table.

But i getting this warning message when using the TextToDate() function.


2024-03-14 12-00-57
Carlos Costa

Hello vishnu,
That error is because you have an underscore "_" in your date. In order to do that, you need to remove the "_".
You can use the TextToDate(Replace(DateVar, "_"," ") ) (Note: when you replace, you need to replace for a space, otherwise it would be an invalid date also, so the third input from Replace needs to be " ")
That should work without giving an error

2024-08-22 11-39-17
Pedro Sousa

Hello, 

Adding to the answer of Carlos you probably want to use TextToDateTime() function.


Regards,

Pedro.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.