Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : wB+f6dDdpW5Q8J/L6qMNl4
Small and medium business | Business Central, N...
Answered

how to Convert DATE Datatype into TEXT DataType ?

Like (1) ShareShare
ReportReport
Posted on 2 Feb 2024 06:14:32 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?
  • Verified answer
    YUN ZHU Profile Picture
    81,491 Super User 2025 Season 1 on 05 Feb 2024 at 00:36:50
    how to Convert DATE Datatype into TEXT DataType ?
    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
  • Ariba Mehdi Profile Picture
    160 on 02 Feb 2024 at 10:03:31
    how to Convert DATE Datatype into TEXT DataType ?
    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
    Judy Profile Picture
    Microsoft Employee on 02 Feb 2024 at 09:47:22
    how to Convert DATE Datatype into TEXT DataType ?
    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,157 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,940 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading started