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

Community site session details

Session Id :
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.
I have the same question (0)
  • Suggested answer
    _Prince_ Profile Picture
    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
    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
    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
    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

Responsible AI policies

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

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 359

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 77 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans