Skip to main content
Question

Filter date uvpy

  • January 15, 2026
  • 13 replies
  • 83 views

jbon
  • Participating Frequently

Hi!

I’ve started to tinker with the Universe database of my company using uopy that allows me to run basic commands from a remote server.

Is there a book or a formation to learn this basic?

Asking AI I’ve been able to list the data of a file, but I would like to filter it by date. What is the formula?

Thanks!

13 replies

Martyna Uleviciute

Hi ​@jbon, I’ve moved your question to this Universe-specific forum. I’m sure the folks here will be able to help you out, thanks!


jbon
  • Author
  • Participating Frequently
  • January 16, 2026

Thanks Martyna, but I can’t see the link to the Universe-specific forum. Could you send it again?

 


Martyna Uleviciute

Hi, ​@jbon , the message is already on the Universe-specific forum, no new link needed :)

 


jbon
  • Author
  • Participating Frequently
  • January 16, 2026

Oh! Understood. Thanks!

 


Emma Breslin
Forum|alt.badge.img+2
  • Rocketeer
  • January 21, 2026

Hi ​@jbon 

The uopy documentation is located here: uopy · PyPI, where you will find resources and examples to assist you.

Additionally you may wish to review the UniVerse Python Guide,  as covered in this documentation  we have  extended the database language capabilities to include the use of Python, a dynamic and modern object-oriented programming language. The integration of Python and U2 allows you to program backend database logic with high extensibility in a language that supports the development of new applications based on U2.

Kind Regards

Emma


jbon
  • Author
  • Participating Frequently
  • January 21, 2026

Thanks a lot for the information. Now I don’t need to do advanced programming, only to query the database.

I’m also doing the u2 course: “U2 Fundamentals 2020” but I haven’t found yet how to filter by date. I know that the command is:

LIST PRODUCTS WITH SALEDATE=20260101 NAME SALEDATE

but it doesn’t work and I think that is becuase 20260101 is not in the right format. 

What is this format?


Jonathan Smith
Forum|alt.badge.img+4

Enter the command LIST PRODUCTS SALEDATE to see what format SALEDATE is using

Then in your query using the same format enclosing the date in quotation marks.

For example from the PRODUCTS file in XDEMO account

LIST PRODUCTS THEATERDATE 08:10:33am  22 Jan 2026  PAGE    1
PRODUCTS....    Theatrical Release Date

1715358952                   03/07/1986
2454315792                   11/07/2003
4339610935                   07/17/1998
4400593912                   03/05/1999

Now

LIST PRODUCTS WITH THEATERDATE = “03/05/1999”

LIST PRODUCTS WITH THEATERDATE = "03/05/1999" THEATERDATE 08:12:46am
22 Jan 2026  PAGE    1
PRODUCTS....    Theatrical Release Date

4400593912                   03/05/1999
4339603827                   03/05/1999
8539169882                   03/05/1999

 


Dave Weinstein
Forum|alt.badge.img

Hi jbon,

UniVerse and other MV databases store dates in internal date format, which is number of days since December 31, 1967, day 0. January 1, 2026 is 21186. The DICT item for SALEDATE may have a conversion code in attribute 3, something like “D4/” which would convert the internal date to an external date we recognize like 01/01/2026. If you do a “LIST PRODUCTS SALEDATE” you should be able to just match the date format you see in your query. 

You can also investigate the DICTionary more thoroughly by doing a ‘LIST DICT PRODUCTS SALEDATE’, or removing the SALEDATE item to investigate the entire DICT. 

I would also suggest checking out https://learn.rocketsoftware.com/ which has another, more modern MV learning track than the U2 Fundamentals course. 

I hope this helps.

Regards,

Dave Weinstein


jbon
  • Author
  • Participating Frequently
  • January 21, 2026

Thanks for your answers.

Printing a list of the FILE I get for example this row  LIST VVO_UV IDV IMP.OPC.JATO COD.PKG.JATO DES.PKG.JATO IMP.PKG.JATO COD.EQU.JATO\r\n DES.EQU.JATO IMP.EQU.JATO FEC_
ULT_MODIF 04:25:27pm  21 Jan 2026

Checking the dictionary I see that is type /D2:
VVO_UV,FEC_ULT_MODIF,A,612,,D2/ Fecha �ltima mo M,8R

 

I’ve tried to filter with:

LIST VVO_UV WITH FEC_ULT_MODIF="04:25:27pm  21 Jan 2026" IDV IMP.OPC.JATO COD.PKG.JATO DES.PKG.JATO IMP.PKG.JATO COD.EQU.JATO DES.EQU.JATO IMP.EQU.JATO FEC_ULT_MODIF
or with:

'LIST VVO_UV WITH FEC_ULT_MODIF=21206 IDV IMP.OPC.JATO COD.PKG.JATO DES.PKG.JATO IMP.PKG.JATO COD.EQU.JATO DES.EQU.JATO IMP.EQU.JATO FEC_ULT_MODIF
each returning the same result: 0 records listed.

 

What am I doing wrong?


Jonathan Smith
Forum|alt.badge.img+4

If you take my example of using the field THEATERDATE the command you enter to query the file using that field is

LIST PRODUCTS WITH THEATERDATE = “03/05/1999”

Regards,

Jonathan

 


jbon
  • Author
  • Participating Frequently
  • January 21, 2026

I’ve tried with your format with the same result:

LIST VVO_UV WITH FEC_ULT_MODIF="21/01/2026" IDV IMP.OPC.JATO COD.PKG.JATO DES.PKG.JATO IMP.PKG.JATO COD.EQU.JATO DES.EQU.JATO IMP.EQU.JATO FEC_ULT_MODIF

 

In the List FEC_ULT_MODIF is displayed as HH:MM:SSpm DD month YYYY


Dave Weinstein
Forum|alt.badge.img

jbon,

Try “01/01/26”, since the DICT item appears to have D2\ conversion code. 

The date you pasted was the current server time it appears.

Regards,

Dave


jbon
  • Author
  • Participating Frequently
  • January 21, 2026

You were right Dave, that is the server time 😳

I’ve moved the field in another position and it looks like empty.

I’ll try to find a better file and try there what you and Jonathan have explained.

Regards!