La funzione encodeTimestamp (struct tm Formato di input)
Converte un valore struct tm in un timestamp Netezza Performance Server. La funzione utilizza solo i campi tm.tm_year, tm.tm_day, tm.tm_mon, tm.tm_hour, tm.tm_min e tm.tm_sec della struttura ts, ignorando il resto. La struttura ts deve superare il test booleano isValidTimeStruct(). La funzione aggiunge anche zero microsecondi al valore codificato.
Descrizione
inline void encodeTimestamp(const struct tm& ts, int64*
encodedTimestamp, bool* errorFlag = NULL)
ts specifica il valore della struct tm Timestamp.
encodedTimestamp specifica il parametro in cui registrare il timestamp codificato in formato Netezza Performance Server.
errorFlag è un argomento opzionale. Se non è NULL, viene impostato su true se isValidTimeStruct(ts) è false. Altrimenti, viene impostato su false.
Eccezioni generate
La funzione lancia un oggetto di eccezione opaco se &ts è NULL o encodedTimestamp è NULL oerrorFlag è NULL e isValidTimeStruct(ts) è false).