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

Notifications

Announcements

No record found.

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
    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
  • Ralph_Marouni21 Profile Picture
    37 on at
    i know that i can use DateTime.MinMax but i want to use the null. is there any idea?
    regards
  • _Prince_ Profile Picture
    11 on at
    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
  • Suggested answer
    _Prince_ Profile Picture
    11 on at
    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

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 41 Most Valuable Professional

#2
iampranjal Profile Picture

iampranjal 39

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans