Index: openacs-4/packages/acs-core-docs/www/variables.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/variables.html,v diff -u -r1.26.2.1 -r1.26.2.2 --- openacs-4/packages/acs-core-docs/www/variables.html 18 Jun 2010 21:29:36 -0000 1.26.2.1 +++ openacs-4/packages/acs-core-docs/www/variables.html 12 Dec 2010 00:07:03 -0000 1.26.2.2 @@ -1,15 +1,24 @@ +<<<<<<< variables.html Variables

Variables

Date and Time Variables

($Id$)

By joel@aufrecht.org

+======= + +Variables

Variables

Date and Time Variables

($Id$)

By joel@aufrecht.org

+>>>>>>> 1.28 OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

Starting with OpenACS 5.0 and the introduction of acs-lang, we recommend retrieving date/time information from the database in +<<<<<<< variables.html ANSI format and then using lc_time_fmt to format it for display.

Example 12.1. Getting datetime from the database ANSI-style

db_multirow -extend { mydate_pretty } {
+=======
+    ANSI format and then using lc_time_fmt to format it for display.

Example 11.1. Getting datetime from the database ANSI-style

db_multirow -extend { mydate_pretty } {
+>>>>>>> 1.28
     select to_char(mydate, 'YYYY-MM-DD HH24:MI:SS') as mydate_ansi,
           ...
     ...
 } {
     set mydate_ansi [lc_time_system_to_conn $mydate_ansi]
-    set mydate_pretty [lc_time_fmt $mydate_ansi "%x %X"]
+    set mydate_pretty [lc_time_fmt $mydate_ansi "%x %X"]
 }
-
View comments on this page at openacs.org
+

View comments on this page at openacs.org