Displaying Time


I’m new to PanoramaX coming from Filemaker.

How do I get a field to display the time? I’ve tried dates and timepattern, but cannot seem to get this to work.

I’m trying to get to know PanoramaX and creating a simple water intake tracker. I want to log the date and time of each entry as well as the amount in ml. I’ve managed the date and the amount, but the time baffles me.

many thanks


To enter the current time into a text field you could use longtimestr(now()) which would enter something similar to 9:26:11 AM.

Among many ways…

In a .NewRecord procedure with text fields named TimeField and DateField:

TimeField = timepattern(Now(),"hh:mm am/pm")
DateField = datepattern(today(),"mm/dd/yy")

Or with with numeric fields named TimeField and DateField:

TimeField = Now()
DateField = Today()

Or with a numeric field named TimeStamp:

TimeStamp = SuperDate(Today(),Now())

A .NewRecord procedure runs automatically whenever a record is added.

Thank guys, this was a great help.

Gary’s worked as a procedure as did James’s first set. But after setting the field to numeric integer the last two of James suggestions just gave me a field with long numbers. Not sure what I’m doing wrong here.

But it is working!

PanoramaX stores dates, time or both together, aka Superdates, as long integers. In that form you can sort, select or make calculations based on date and/or time. If you want to see them in human readable forms then you’ll need to convert them to text in whatever format you wish. Panorama can also convert many text formats to date and/or time integer values for you. There is is a full range of built in functions to work with time and dates. Most of it is discussed in these four help pages:

Date Arithmetic Formulas
Date Patterns
Time Arithmetic Formulas

There is a “Date” datatype which lets you store dates (only) in their integer values, but displays them as text in the pattern of your choice on the Data Sheet. You can’t store the integer and display the human text version for Time or Superdates in a single field on the Data Sheet. However you could, on the Data Sheet, store those values as integers in one field and, redundantly, their text conversion in another field; or you could make a Form on which you can show whatever you want.

Dang spellcheck, it’s Superdates, not Supernates, time rather than chemistry, jargon!

This may help - note that the date format is Australian, not US:

Panorama uses integers for both dates and times. Date values contain days, and time values contain seconds.

Panorama has a special field type for dates that stores the values as integers, but displays them as dates, and also allows data entry as dates. Very convenient.

However, Panorama does not have a special field type for time values. So you have two choices – you can either use an integer field or a text field. If you use an integer field, the time values can be sorted, but they will display as seconds, and you’ll have to enter them as seconds. If sorting isn’t needed, you can just use a text field.

That is normal – it is displaying the number of seconds since midnight. Hopefully I’ve given you a bit of context for the other excellent answers.

1 Like

Thank you, that helps explain it well!

After you post, you should see a little pencil icon, among others, just below your text.

Click on that to go back and edit your post. If you do it quickly enough, there won’t be any indicator that it was edited, and your typo will be your little secret.