Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Convert date in TEXT format into DATE

(0) ShareShare
ReportReport
Posted on by 80

I have date  01/04/2020 in text datatype. Now, I want to convert and return to DATE datatype. Is there any solution?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,036 Super User 2024 Season 2 on at
    RE: Convert date in TEXT format into DATE

    Hi, Nitin is right. The current date format displayed on the page depends on the Region of your current system.

    So if you want to change '01/04/20' to '01/04/2020', you should change your region first. (About this our Partner cannot specify)

    For example,

    pastedimage1654826359388v3.png

    pastedimage1654826312155v2.png

    Hope this helps as well.

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Convert date in TEXT format into DATE

    Please refer below link

    docs.microsoft.com/.../ui-enter-date-ranges

  • Sujan Khadka Profile Picture
    Sujan Khadka 80 on at
    RE: Convert date in TEXT format into DATE

    pastedimage1654772093890v1.png

    In Message(Format(abc)) suppose I have 01/04/2020 which is in text datatype. After evaluating with date type, my answer would be 01/04/20 which is a date datatype. But my task is to return 01/04/2020 with date datatype. 

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Convert date in TEXT format into DATE

    This is the different question, Initially you asked this "I have date  01/04/2020 in text datatype. Now, I want to convert and return to DATE datatype. Is there any solution?" answer of this I have already shared.

  • Sujan Khadka Profile Picture
    Sujan Khadka 80 on at
    RE: Convert date in TEXT format into DATE

    Hi Nitin Verma,

    above answer returns 01/04/20. But my requirement is that I need 01/04/2020. Hope you understood

  • Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Convert date in TEXT format into DATE

    Hi Sujan Khadka ,

    Please use below:

    yourtextdate := '01/04/2020';

    Evaluate(DateTypeVariable,yourtxtdate);

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans