Change Attribute from Text to Datetime field

  • 20 February 2024
  • 1 reply

When we had some attributes created 2 of our date fields were created using Text rather than DateTime

I have been through some articles mentioning using CDATE, however I have not been able to get this to work yet. The final aim is to be able to sort by Contract End date DESC in the Customers GI.

Is there a way to do this without recreated the fields?



Best answer by darylbowman 20 February 2024, 22:33

View original

1 reply

Badge +11

Is there a way to do this without recreated the fields?

Yes and no.

You should be able to convert a correctly formatted string to a date with CDate(), but since you have no validation on your field, anyone could enter anything, therefore probably giving you errors when attempting to convert.

You could create new date attributes and attempt to copy the values from the current string attributes to the new date attributes, but this is magnificently complex.


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved