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

Announcements

No record found.

News and Announcements icon
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
    99,049 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,804 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,103 Super User 2026 Season 1

#3
Kamal Khakhkhar Profile Picture

Kamal Khakhkhar 695

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans