GildeRecord - Cast a field as date? - is it possible

Natalie Timbs
Tera Contributor

Hey,

 

Our import sets import the data into staging tables with a data type of string and we the want to do a query over the data to remove older entries based upon on a date field, but since it's a string we can't properly use gliderecord.orderBy.

 

1) Is there a way to cast the field as a date with in a gilderecord query?

2) Is there a way to set a default data type of a dynamically create table that is built by an excel file?

    The excel file does have the correct data formatter applied, but that doesn't seem to carry over into the data source    / import sets area.

 

Note: We are unable to set a default data type in the staging table, due to the staging tables being dropped every 7 days. 

 

6 REPLIES 6

got it, i see new table column updating the value the used as orderby. 

in any case, the orderby need a column name for sorting. as we don't have control over orderby method, i don't think any possibility for this parsing.

Any chance, you can update the table structure for this string type column or add this new column in design.

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hi AshishKMishra,

 

Sorry for the delay in replying. sadly we can't modify the table structure as table is drop an is automatically created via the data source import process. which detected the table is missing and re-creates it.

 

I think we will just have to use the solution we have build.

thanks for all your help.

Kind Regards,

Natalie.