elsenorjose
Technical User
Hello all,
I've been searching through the forum looking for the correct formula so I can extract a date from a text field and I have part of it working but I would like to tweak the formula to take into account NULLs and also to convert the results into a date type and also strip any text that remains as a result. I've used the following from a previous post:
This gives me results that are dates (9/7/11) but also some text results (PRG1384A) or NULLs. What I'd like to do is tweak the formula so that if I get any text or NULLs, I'd like to convert it to some dummy date (1900-01-01 or something) and then have only real dates in the result of the formula formatted as date. I am trying to group on the results of the formula to chart data over a period of time so I need the results to be in a date format.
I am using CRXI R2 on a SQL Server 2005 backend.
Thank you
I've been searching through the forum looking for the correct formula so I can extract a date from a text field and I have part of it working but I would like to tweak the formula to take into account NULLs and also to convert the results into a date type and also strip any text that remains as a result. I've used the following from a previous post:
Code:
whileprintingrecords;
If IsNull({NCR_Form.Stock Locations}) Then ToText(date({NCR_Form.Date_Closed}), "M/dd/yy")
Else stringvar MyStrDate:=mid({NCR_Form.Stock Locations}, instrrev({NCR_Form.Stock Locations}," ")+1)
This gives me results that are dates (9/7/11) but also some text results (PRG1384A) or NULLs. What I'd like to do is tweak the formula so that if I get any text or NULLs, I'd like to convert it to some dummy date (1900-01-01 or something) and then have only real dates in the result of the formula formatted as date. I am trying to group on the results of the formula to chart data over a period of time so I need the results to be in a date format.
I am using CRXI R2 on a SQL Server 2005 backend.
Thank you