PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: eldonfsr on June 05, 2026, 12:33:55 PM

Title: Query don't show dates as dates
Post by: eldonfsr on June 05, 2026, 12:33:55 PM
Whay show like that i need to create a format for that column secound column
Title: Re: Query don't show dates as dates
Post by: Len Vassos on June 08, 2026, 08:36:02 AM
How is the date stored in the file?   It looks like the date is stored in some packed date format, that may need to be unpacked first.   
 
Title: Re: Query don't show dates as dates
Post by: eldonfsr on June 10, 2026, 11:48:57 AM
Thanks Len is istored in format of pvx is default dictionay for pvx i don't change nothing how i can unpacked ?
Title: Re: Query don't show dates as dates
Post by: James Zukowski on June 10, 2026, 11:59:06 AM
It looks like the year portion of the date was created using the "%A" format of the DTE() function.
Title: Re: Query don't show dates as dates
Post by: eldonfsr on June 10, 2026, 05:39:48 PM
ok ehat i need to do query take datas and who or i need change on format on column propeties
Title: Re: Query don't show dates as dates
Post by: Susan Cryderman on June 11, 2026, 09:47:16 AM
I'm not sure how your application is handling dates but if you enter the command:

DAY_FORMAT READ x$

x$ will contain the date format currently in effect.

For this example, the format is "YYYYMMDD" and the dates are stored in the data files this way.

A Query on the invoice file will print Invoice Dates as 20251013, 20240131 etc. if the InvoiceDate$ column is included.

The query definition allows you to press the Add Formula button to define a new column.  I defined it as follows:
Column Title:  Formatted Invoice Date
Formula:  DTE(InvoiceDate$:"%D %Ml, YYYY")
Width: 20


Here is a help link for the Query Formula Definition dialog:
Query Formula Definition (https://manual.pvxplus.com/page/NOMADS%20Graphical%20Application/Dictionary-Based%20Development/Query%20Subsystem/Query%20Formula.htm)