<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% This file is embedded in datatool-user.pdf version 3.4 2025-04-03
% Example 45 Parsing Dates and Times
% Label: "ex:parsetemporal"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{datatool-base} 
\begin{document}
Parsing off by default. 

\DTLparse\result{2025-01-09}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 

\DTLparse\result{2025-01-09T14:42:01}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 

\DTLparse\result{2025-01-09T15:42:01+01:00}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 

\DTLparse\result{14:42:01}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 

\DTLsetup{datetime={parse}}
Parsing on. 

\DTLparse\result{2025-01-09}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 

\DTLparse\result{2025-01-09T14:42:01}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 

\DTLparse\result{2025-01-09T15:42:01+01:00}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 

\DTLparse\result{14:42:01}
String value: \result.
Data type: \DTLdatumtype{\result}.
Value: \DTLdatumvalue{\result}. 
\end{document}
</pre></body></html>