% This file is embedded in datatool-user.pdf version 3.4.1 2025-04-25
% Example 41 Formatting and Parsing Currency (No Region)
% Label: "ex:noregioncurrency"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{datatool-base} 
\begin{document}
Currency code: \DTLCurrencyCode. Currency symbol: \DTLCurrencySymbol. 

\DTLdecimaltocurrency{12345.678}{\formattedresult}
Formatted: \formattedresult.
(Numeric value: \DTLdatumvalue{\formattedresult}.) 

\$1,234.57 add 1,236.59:
\DTLadd{\total}{\$1,234.57}{1,236.59}
Total: \total. 

1,234.57 add £1,236.59:
\DTLadd{\total}{1,234.57}{£1,236.59}
Total: \total. 

€48,236.59 multiplied by 0.5:
\DTLmul{\result}{€48,236.59}{0.5}
\result\ (\DTLdatumvalue{\result}). 

\DTLparse\parsed{€19,234.56}
String value: \parsed.
Numeric value: \DTLdatumvalue{\parsed}.


\DTLparse\parsed{£28,342.64}
String value: \parsed.
Numeric value: \DTLdatumvalue{\parsed}.


\DTLparse\parsed{19,234.56€}
String value: \parsed.
Numeric value: \DTLdatumvalue{\parsed}. 

Formatting specific currency symbol: \DTLfmtcurrency{\texteuro}{12.345,65} 

Formatting default currency symbol: \DTLcurrency{12 345,65} 

Formatting EUR: \DTLfmtcurr{EUR}{12.345,65} 
\end{document}
