2.1.8.27 ocu_guess_date_time


Description

scan the strings to see if they are consistently date-time text

Syntax

int ocu_guess_date_time( StringArray * psa, int nMax = 0 )

Parameters

psa
[input] strings to check
nMax
[input] if >0 to limit the number of entries to check

Return

CSVDT_SHORT_DATE etc

Examples

EX1

int nType = ocu_guess_date_time(&sa);
if(nType > CSVDT_NONE)
    strFmt = LABUTIL_get_ISO_custom_format(nType);

EX2

#include <ocu.h>
void ocu_guess_date_time_ex()
{
	vector<string> vs(2);
	vs[0] = "21:34";
	vs[1] = "11:09";//"1/20/2020";
	int nDateTime = ocu_guess_date_time(&vs, 10);
	out_int("nDateTime=", nDateTime);
}

Remark

See Also

Header to Included

ocu.h

Reference