Re: How to convert date to integer or vice versa

2022-08-09 Thread David Samson via 4D_Tech
I think this is what you are looking for: https://kb.4d.com/assetid=28510 David > I have two fields in a table which must contain the same information. > One is date, the other an integer. > Rather than entering the same information twice, I would like to enter it > in one field and have 4d

Re: How to convert date to integer or vice versa

2022-08-08 Thread Keith Goebel via 4D_Tech
Stephane, I no longer have access to Design mode as I am retired and have let my 4D Partner license lapse so I’m unable to check out the latest date/number commands. That said, I used to store dates as numbers in a way that sorted the numbers chronologically. I did that by extracting the day,

Re: How to convert date to integer or vice versa

2022-08-08 Thread Keith Goebel via 4D_Tech
Hi Stephane, Thinking in ”old-school” 4D code, using a trigger can be a good way to enforce a field population rule but an alternative is to create the date field’s object method and populate the integer from there. The code may well be easier to find and maintain from there. If you need help

Re: How to convert date to integer or vice versa

2022-08-07 Thread Keisuke Miyako via 4D_Tech
triggers! https://doc.4d.com/4Dv19R5/4D/19-R5/Triggers.300-5831495.en.html Can you help with the proper method to do so. ** 4D Internet Users Group (4D iNUG) New Forum: https://discuss.4D.com Archive:

How to convert date to integer or vice versa

2022-08-07 Thread Stephane Potvin via 4D_Tech
I have two fields in a table which must contain the same information. One is date, the other an integer. Rather than entering the same information twice, I would like to enter it in one field and have 4d fill the other field automatically. Can you help with the proper method to do so. Thank you.