TEXT(UTCNOW(),"DD-MMM-YY HH:MM:SS") not showing seconds value

I'd like to see the seconds in my expression result so that I can sort my column with more granularity.

I'm using a DateTime type column with the following initial value expression:

TEXT(UTCNOW(),"DD-MMM-YY HH:MM:SS")

This is what I get:

Jake_Naude_0-1708551692430.png

Is it possible to show the seconds values or is this as good as it gets...?

Many thanks... ๐Ÿ™‚

Solved Solved
0 13 173
1 ACCEPTED SOLUTION

You can find it under your DateTime column's definition.

View solution in original post

13 REPLIES 13

Not sure why the seconds don't show. But, rather than using TEXT() have you tried just using UTCNOW() for a true DateTime column? I'm actually surprised that Appsheet didn't throw an error using TEXT() in a DateTime column initial value.

Hi @Markus_Malessa ... I have buddy, and it gives me the same result...

Jake_Naude_0-1708556510583.png

Jake_Naude_1-1708556574873.png

 

Interesting. So just to see if we get a result with the seconds included, do you mind trying just NOW(). Second alternative which might be worth trying also is set the column value via an automation using UTCNOW(). Sorry just using you as a guinea pig.

Hi @Markus_Malessa ... Yes...  Interesting indeed... I switched to NOW() and got the same...

Jake_Naude_0-1708558318526.png

I then added it to a bot that fires on data change ADD and sets row values of [survey_date_time] to UTCNOW() and got the same:

Jake_Naude_1-1708558537234.png

๐Ÿค”

Here's the bot setup:

Jake_Naude_0-1708558689830.png

Jake_Naude_1-1708558722815.png

Update

I also set it up as NOWUTC(), fired by and action in the app and got the same...

Jake_Naude_0-1708559542629.png

However, this was interesting... I can see seconds when testing the expression from within the expression builder...

Jake_Naude_1-1708559606960.png

๐Ÿค” ๐Ÿค” ๐Ÿค”

 

Hi @Jake_Naude ,

Could you update what those rows screenshots that you have shared are from say Excel or Google Sheet or maybe an SQL database?

if so please ensure the datetime format of that column for the backend database system is also DD-MMM-YY HH:MM:SS  or alternatively, please make that column's format as plain text if  Google sheets is backend db. 

As we can see in the image below , the Google sheet tends to select the datetime format as dd/mm/yyyy hh:mm:00 by default. 

Suvrutt_Gurjar_0-1708574026857.png

In summary, you may want to ensure a proper column format for the backend columns also.

In general , a plain text for all columns should work good for Google sheet as backend for an Appsheet app.

@Steve 's excellent tip for the spreadsheet formatting for an AppSheet app is below.

Spreadsheet formatting tips - Google Cloud Community

 

 

Hello again @Suvrutt_Gurjar ... ๐Ÿ˜‰

I'm using Excel in OneDrive as my data source..

Here's that view you were after...

Jake_Naude_0-1708589983672.png

Thanks, I read Steve's post, reset my whole sheet to text and I got the same result.

I then reformatted only the survey_date_time column back to custom: dd mmm yyyy hh:mm:ss in excel and I still get the same 00 result on seconds.

๐Ÿ˜‰

UPDATE:

When I use the test function in the Expression Assistant, I can see the second values... ๐Ÿค”

Jake_Naude_1-1708595727024.png

Jake_Naude_0-1708595690067.png

 

 

Any chance you have the option "Ignore seconds" set as ON?

@Hi @AleksiAlkio ...

I've searched high and low in AppSheet for just such a setting and can't find it... Please advise...?

Many thanks.

You can find it under your DateTime column's definition.

Thanks a million @AleksiAlkio ... That was it... I've unchecked it and all is right in the world again... We have seconds... ๐Ÿ˜Ž

You're welcome. Quite often the reason is more simple and you don't think about it.

Thanks for sorting this out @AleksiAlkio. I didn't realize this was a setting. Do you happen to know what the default is? I was thrown off because I'm sure mine have always recorded the seconds on a DateTime column.

Default is OFF.

Top Labels in this Space