question

SunMengITC-3608 avatar image
0 Votes"
SunMengITC-3608 asked YiLu-MSFT commented

In Sharepoint Lists: TEXT(NOW(),"YYMMDDHHMMSS") return wrong time value

Hello guys,

I found an issue when I create sharepoint Lists website.

Background:
I created a Lists website in sharepoint, then I wanna add a new column named TTID2 as below.
TTID2 is used to generate a timestamp ID for the task. So I selected a single line text for this column , and set default value as calculated value.
I used TEXT(NOW(),"YYYYMMDDHHMMSS") function to return the timestamp in string type.

Symptom
The current timestamp is 20220414112627
But the TTID column default value is TID1_20220413202627
default timestamp is 15 hours late.
However I check the website region and time zone, that is right .
I set TTID column as time Data and Time type , use NOW() function . The returned timestamp is right.

Have anyone ever encountered similar issue? Please don't hesitate to comment.
Thanks

MS

192875-image.png


192908-image.png





office-sharepoint-onlinesharepoint-dev
image.png (14.6 KiB)
image.png (35.8 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am currently doing some research on this issue, will let you know as soon as possible.

1 Vote 1 ·

Thank you.

0 Votes 0 ·

1 Answer

YiLu-MSFT avatar image
0 Votes"
YiLu-MSFT answered YiLu-MSFT commented

Hi @SunMengITC-3608
You could try to create a calculated column using formula to get the correct timestamp:

 ="TID-"&TEXT(Created,"YYYYMMDDHHMMSS")

194055-image.png



If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (38.5 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @YiLu-MSFT
Appreciated for your answer. But that's a workaround solution.
In the sharepoint Lists app, we wanna copy TID from one task card directly .
But if I create the TID as calculated column, it cannot be select or copy .
That's why I used the text column.

![194157-image.png][1]


0 Votes 0 ·
image.png (5.0 KiB)
YiLu-MSFT avatar image YiLu-MSFT SunMengITC-3608 ·

Hi @SunMengITC-3608
I am disccussing this case with my teammate and will reply to you if we get an answer.

0 Votes 0 ·