web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

how to Convert DATE Datatype into TEXT DataType ?

(1) ShareShare
ReportReport
Posted on by 7
I have date  01/04/2020 in Date datatype. Now, I want to convert and return to TEXT datatype. Is there any solution?
I have the same question (0)
  • Verified answer
    Judy Profile Picture
    Microsoft Employee on at
    Hi,
     
    To convert a date in the Date datatype to Text datatype in AL, you can use the FORMAT function.
    Txt:= Format(Dt);
    The reference Document:
     
    Best Regards,
    Judy
  • Ariba Mehdi Profile Picture
    166 on at
    Hi,

    Try the following 2 possible solutions: 
     
    1. Check System.Format() method from the link shared below:
     
    2. Try using StrSubsNo(). Check the link below the image as well. 
     
    Hope this helps!
  • Verified answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at
    Hi, if this is related to language encoding, you can try the FormatDate method in the codeunit below. This returns a Text date.
     
    Hope this helps.
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans