Share this page

# Example: lr_save_datetime

In the following example, lr_save_datetime retrieves tomorrow's date.

        lr_save_datetime("Tomorrow is %B %d %Y", DATE_NOW + ONE_DAY, "next");
        lr_output_message(lr_eval_string("{next}"));
        // Output: Action.c(4): Tomorrow is November 18 2014

These examples show the effect of formatting:

        lr_save_datetime("%Y-%m-%d", DATE_NOW, "dateReceived");
        lr_output_message(lr_eval_string("{dateReceived}"));
        // Output: Action.c(7): 2014-11-17

        lr_save_datetime("%m/%d/%Y %H:%M", DATE_NOW, "currDateTime");
        lr_output_message(lr_eval_string("{currDateTime}"));
        // Output: Action.c(10): 11/17/2014 15:14

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: