I have thousands of records to go through and I need to pull out a specific date. Heres the set up of the fields one field is full of Null values and the second field is an ID field that looks like this XX_01052001_092045. The first part is a set of letters, the next is the date being MMDDYYYY. The third part is the time, all I want is to pull out the date and put that into the field full of null values. However the format that is requested is that the new date look like this MM/DD/YYYY. Is there a way to use the field calculator and parse this out?
Depending on if your data is all formated the same way you can use the following directly in the field calculator with the VBScript parser activated:
mid([ID],3,4) & "/" & mid([ID],5,6) & "/" mid([ID],7,10)
If your ID is not always the same you can search for the position of the underscore with the InStr function like:
mid([ID],InStr([ID], "_", InStr([ID], "_")+2)
Please comment if you need it to be python. Just took the vb approach from memory.