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

Sun.Meng 孫萌 ITC 1 Reputation point
2022-04-14T03:35:17.533+00:00

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

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,736 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,686 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yi Lu_MSFT 17,461 Reputation points
    2022-04-19T02:27:54.227+00:00

    Hi @Sun.Meng 孫萌 ITC
    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.