Difference in datepattern

datepattern(today(),“yyyymmdd”) = 2018214 in Panorama 6.
datepattern(today(),“yyyymmdd”) = yyyymmdd in Panorama X.

What I would really like is 20180214, for date stamping.

This will work:


Are you sure you don’t want the result to be 20180214? If so, use:


Thank you, I wanted datepattern(today(),“YYYYMMDD”), which gives me what I want. No need for replace(.

I am trying to get PanX to select a records with a given date obtained by doing a copycell. In Pan 6 I used: Select StockDate=date(datepattern(clipboard(),mm,dd,yy)). This doesn’t seem to work in Pan X. Any suggestions as to why not or what I need to make the selection. Thanks.

Do a right-click on your date cell.

Thanks, but I would like to code it as part of a selection procedure, because I have a part 2 in the selection process, that being a selectwithin or Select A and Select B.

In Panorama X, the content of a cell is copied as text, so you don’t need the datepattern( function to convert it to text. Just use

Select StockDate=date(clipboard())

Hi David:
I must be doing something wrong, as I had tried that (as it gave me that code when I did a record). No luck. It does the correct selection using Kurt’s method, but not as a procedure. No, I used datevalue and not date, I think because in Pan 6 I had to convert dates to text. I just tried it and the selection does work as you suggest. I then included my other selection and all works as it used to in Pan 6. Thanks for responding on a Sunday evening.

My code is now: select StockDate = date(clipboard()) and Share =1

If you want to select records with the same date as the current record, here is one way to do it. No need for the clipboard to be touched at all.

let cellDate = StockDate
select StockDate=cellDate

I picked the variable name cellDate out of thin air, you could use any name you want as long as you are consistent and it doesn’t conflict with a field name.

Thank you Jim, I will try that as well.

I come back once again with a second question on selecting a date. That is, I now want to pick a date and then have all the dates from that month selected. I can do this easily manually, but I would like to create a variable and use a procedure. The recorder creates this when I do a manual selection:

select month1st(Date) = month1st(datevalue(2020,1,6))

Date is the field. I see how the recorder manipulates my Date (01/06/2020) to YYYY,MM,DD, but I can’t figure out how to replace the Date with my variable so I can select any date in any month and get all the records for that month, but using a procedure.

I tried copycell and called that selectDate and put that in place of (2020,1,6), but that didn’t work. I tried using datepattern and placing that into the datevalue(), but that also did not work for me. So, I am lost.

Any help would be appreciated, as always.


Let thisDate = month1st(Date)
Select month1st(Date) = thisDate

The datevalue( function is turning 3 numbers into a date. The value in your Date field is already a date, so you don’t need the datevalue( function.

Glad you stopped by and made my life more fun…
One of these days I will get a hang of this.

You make it look so easy, just like all professionals (like watching someone run a 3:50 mile and being awed by how easy they made it go). You are a sub 3:50 miler in my eyes…:wink:

Thank you very much.

At my fastest, I never quite made it under 5 minutes.

You are too modest. Your knowledge base for Panorama is incredible. I’ve used Pan since Pan 3.0 and trial and error my way through every project. My pace is the same as my walking pace, which is just about 15:00 per mile…ha, ha.