Hi,
I am reading data from Excel using the Advanced Excel Cell_Read action. The Cell_Read.Value returns the data as Text, but I need it in Date format. However, when I use OutSystems' default TextToDate() function, it returns NullDate. How can I validate or convert this text value properly to a valid Date? But in our Data Base Date datatype is set to Text the correct value (5/20/2025 12:00:00 AM ) saved But By using Conversion It saved to 1900-01-01
Hello, Could you please share your Excel file? If possible, please also share the OML file
Hi @Venkatesaiya , Thanks for responding
Consider Uploaded the sample Excel file for reference
Regards,
SreenivasuluReddy
Hi SreenivasuluReddy Lingala ,Converts Text 't' to a Date value.If 't' can't be converted to a valid Date value, the function will return the Date default value. To check if the conversion is possible you can use the TextToDateValidate function.You should check the limits of the Date data type. You should also ensure that the date you type in the argument complies with the default date format (yyyy-mm-dd, yyyy/mm/dd, and yyyy.mm.dd) or the server's environment configuration. Note that, when using the date format defined in the environment configuration, the function will only accept the separator character defined in that date format. For example, if the environment date format is set to 'DD-MM-YYYY', you cannot use '/' or '.' as separators in 't'. In our excel its provide date format as (d/m/yyyy)-4/14/2025 ---Its not matched with outsytem configuration. Which is why its returned default value .
Hi
This is the format in my Excel
Hi SreenivasuluReddy Lingala ,Please refer to this forum discussion Link and the attached OML file. It contains the solution to your problem.
I also tried it in my personal environment, and it worked fine for me .Please refer my Attached OML file