Would someone provide an example of extracting data from a char array? I have tried so many things now that I am just confused.
I am not understanding the way char arrays work.
I can't get the date and names extracted.  And when I use just strings, I jam up the memory.

Below was my last attempt, before asking the question.
while (f.available()) {
  String line = f.readStringUntil('\n');

  if (line.startsWith(&quot;04-23&quot;)) {
    currentDay = 1;
    int str_len = line.length() + 1;
    char char_array[str_len];
    line.toCharArray(char_array, str_len);
    Serial.println(char_array);                 // Everything works to here
    for (int j = 0; j &lt; 2; j++) {
      b += char_array[j];
    }
    bMth = b.toInt (); // This should be an int of the birth month in this case: 04
  }
}

Var:
format: MM-DD-YYYY,Name  // this is inside the file
line = &quot;04-23-2020,James&quot;  // This is the output from - Serial.println(char_array); 

What I am trying to do is

Extract the month/day so that I can compare it to today.
The year so I can calculate the age.
The name to display on OLED.
Everything else seems to work, but I can't get my head
wrapped around the char array access.

To do this in PowerShell I would do:
$line = &quot;04-23-2020,James&quot;

$dob = ($line.Split(&quot;,&quot;))[0]
$bMth = ($dob.Split(&quot;-&quot;))[0] # This is not used in this example
$bDy = ($dob.Split(&quot;-&quot;))[1]  # This is not used in this example
$bYr = ($dob.Split(&quot;-&quot;))[2]

$age = $(get-date -UFormat %Y) - $bYr

Clear-Host
Write-Host (@'
Name: {0}
Age:  {1}

'@ -f $($line.Split(&quot;,&quot;))[1], $age)

In Python:
import datetime as dt

line = &quot;04-23-2020,James&quot;

dob = (line.split(',')[0])
bMth = (dob.split(&quot;-&quot;))[0] # This is not used in this example
bDy = (dob.split(&quot;-&quot;))[1]  # This is not used in this example
bYr = (dob.split(&quot;-&quot;))[2]

age = int(dt.datetime.now().year) - int(bYr)

print('Name: ',(line.split(',')[1]))
print('Age: ', age)
When working with Arduino, cplusplus.com is your friend. Scroll down and look on the left side under (string.h). Lot's of great char functions there. Other useful functions such as iota() - cplusplus.com.
Here's one way to accomplish the parsing of the input data.
// Sketch uses 2064 bytes (6%) of program storage space.
// Global variables use 323 bytes (15%) of dynamic memory.
// Arduino IDE 1.8.9.
char line[] = &quot;04-23-2020,James&quot;;
char Name[100];
unsigned int Month, Day, Year;

// Make an attempt to validate the input data.
byte Counter = 0;

void setup(){

  Serial.begin(9600);

  char * pch = strtok(line, &quot;-,&quot;);

  while(pch != NULL){
    if(Counter == 0){Month = atoi(pch);}
    else if(Counter == 1){Day = atoi(pch);}
    else if(Counter == 2){Year = atoi(pch);}
    else if(Counter == 3){strcpy(Name, pch);}
    pch = strtok(NULL, &quot;-,&quot;);
    Counter += 1;
  }

  // Print out the data.
  if(Counter == 4){
    Serial.println(Month);
    Serial.println(Day);
    Serial.println(Year);
    Serial.println(Name);
  }
  else{
    Serial.println(&quot;Error&quot;);
  }

}

void loop(){}