Site hosted by Angelfire.com: Build your free website today!

PowerBuilder - Adding the Compilation Date to the About Box


There are several methods used to include the compilation date (and time) of an application into some visual object component like the application's "About" box.

Jason Vogel

// The application version
date d_compile_date = Today()
ls_version = "Version 0.9.78 - " + string(d_compile_date)
of_SetVersion (ls_Version)

Phil Armstrong

We use this global variable.  The time is updated whenever the app is saved or regenerated.  An incremental build may not update the variable.

datetime gdt_build = DateTime(Today(), Now())

Boris Gasin

You need to assign a value to the variable in the declaration line. It will be evaluated when the object is saved. It is also already done in

PFC 6.0 pfc_n_cst_debug :

constant date PFC_BUILD_DATE = Today()
constant time PFC_BUILD_TIME = Now()

5.0 pfc_n_cst_debug :

constant date icd_build = Today()
constant time ictm_build = Now()

Simply reference those variables

MessageBox("Build Date",String(DateTime(n_cst_debug.PFC_BUILD_DATE, n_cst_debug.PFC_BUILD_TIME))

Roy Kiesler

Declare an instance variable of time datetime in your application object as follows:

Protected:
Datetime idt_stamp = DateTime( Today(), Now() )

When you reference this variable in your about box, it will contain the value assigned to it at compile time. Why and how: Powerbuilder treats variables initialized as part of their declaration as CONSTANTS! Simple.

Robin Strong
Concise Software Limited
London, England

CONSTANT Date c_TODAY = Today()
CONSTANT Time c_NOW = Now()

// Open for w_about
st_compile.Text = String( DateTime( c_TODAY, c_NOW ))

Claudio Quant

Just a reminder that inside the pfc_n_cst_debug service PFC 6 has the following information:

constant integer PFC_MAJOR = 6
constant integer PFC_MINOR = 0
constant integer PFC_FIXES = 0

constant string PFC_NAME = "PowerBuilder Foundation Classes"
constant date PFC_BUILD_DATE = Today()
constant time PFC_BUILD_TIME = Now()

P.S. PFC 5 has similar information but with different constant names.