Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

date type to null

(0) ShareShare
ReportReport
Posted on by 37
hii,
how to put date into null in this example?( prescription[/cref5_appointmentdate/] =Appointment.Attributes.Contains(/cref5_date/) ? Appointment.GetAttributeValue<DateTime>(/cref5_date/): /....../)
regards.
  • Suggested answer
    _Prince_ Profile Picture
    _Prince_ 11 on at
    date type to null
    You can directly assign null value to Date field in that case,
     
    prescription[/cref5_appointmentdate/] =Appointment.Attributes.Contains(/cref5_date/) ? Appointment.GetAttributeValue<DateTime>(/cref5_date/) : null ;
     
    It will work.
     
    Hope this helps, please mark this response as verified if it answers your question.
     
    Regards,
    Prince
  • _Prince_ Profile Picture
    _Prince_ 11 on at
    date type to null
    You can directly assign null value to Date field in that case,
     
    prescription[/cref5_appointmentdate/] =Appointment.Attributes.Contains(/cref5_date/) ? Appointment.GetAttributeValue<DateTime>(/cref5_date/) : null ;
     
    It will work.
     
    Hope this helps, please mark this response as verified if it answers your question.
     
    Regards,
    Prince
  • Ralph_Marouni21 Profile Picture
    Ralph_Marouni21 37 on at
    date type to null
    i know that i can use DateTime.MinMax but i want to use the null. is there any idea?
    regards
  • Suggested answer
    _Prince_ Profile Picture
    _Prince_ 11 on at
    date type to null
    Hi
     
    Instead of passing Null at last you can simply use "DateTime.MinValue".
     
    your code will look like "( prescription[/cref5_appointmentdate/] =Appointment.Attributes.Contains(/cref5_date/) ? Appointment.GetAttributeValue<DateTime>(/cref5_date/): DateTime.MinValue)".
     
    Hope this helps, please mark this response as verified if it answers your question.
     
    Regards,
    Prince

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,569 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans