Working with DatesHome Contents Please email any bug reports, comments or suggestions to ExperLog's Online Support OverviewIn most cases, ExperShop uses long integers to store date/time informations: the main reason is that every database has its own Date formats, but every database can store long integers!This way of handling dates is y2k compliant, of course, as ExperShop has been designed in 1999 (with current integer formats, a problem might occur in year... 2037, but in 2037 Integers should be wider than today ;)
Displaying dates in DynHtml templatesDynHtml includes a predefined data object, called "CurrentDate", that gives access to dates relative to the currend day.For example, $CurrentDate:Now$ is the current day. CurrentDate has the following attributes:
Formats are those defined in the java.text.DateFormat class, so you can also use the predefined DateFormat.SHORT, DateFormat.MEDIUM, DateFormat.LONG and DateFormat.FULL formats; Example, $(DateFormat.SHORT)CurrentDate:Now$ will display the current date in short format. Dates can also be shifted, relative to the current time; for example, the following constructs are valid:
Converting text to date valuesThe (DateVal) modifier can be used to convert a date text to an ExperShop date value (a long integer); the date text must be of the following format: yyyy:MM:dd (yyyy is the year, MM the month and dd the day).For example, $(DateVal)1999:09:15$ will be converted to a long integer value that represents September 15th 1999.
|