Check to see if Date Can be Formatted

I have a string “24 February 2020” and would like to convert it to 20200224. Any help would be greatly appreciated :slight_smile:

1 Like

@Stabbathehut Try this below code

           Assign string urvariable = "24 February 2020"
           Assign urvariable = CDate(urvariable).ToString("yyyyMMdd") 

Now urvariable will have 20200224. Try this and let me know

2 Likes

Cdate(dateinstring).tostring(“yyyyMMdd”)

2 Likes

What variable types do you use?

@Stabbathehut Its string variable

This is what I have inputted


This is the errir U an recieving using string as a variable type

@Stabbathehut What is the datatype for RawDate