= Current Date and Time in XSLT (DOS/Windows) = ||'''Version'''||'''Date'''||'''Changes'''|| ||1.0||2009-06-12||Initial version.|| == Description == This topic shows a way to retrieve the current date or time from DOS when using ePublisher 9.2. '''Note:''' ePublisher 9.2 uses Microsoft .NET for its XSLT engine. The version provided does not support XSLT 2.0, which includes functions for accessing the current date and time. These solutions will obsolete when .NET supports 2.0. The method in this topic uses DOS (Windows) batch files to get the date or time from Windows. '''getdate.bat''' {{{ @echo off date /T }}} '''gettime.bat''' {{{ @echo off time /T}}} Place these two batch files in the a folder called ''Tools'' in the format directory, like this: {{{ Formats Dynamic HTML Pages Tools Transforms }}} Call one of the batch files and return the date or time like this: {{{ }}} == Utility file == I use a utility XSLT for storing templates of common functions. This file has templates for getting the current date, time, and year. Then I can just call one of the functions when I need a date or time, like this: {{{ }}} '''utility.xsl''' Here is the complete listing for utility.xsl {{{ }}} ---- CategoryTemplate CategorySolutionsOutputXmlAndXsl