locked
HealthServiceDateTime RRS feed

  • Question

  • Having a hard time setting the correct date time format for any of the *Endorsement members in Directives.

    Tried several formats, but keep on getting the value of 1900 stored in the record (the actual date is 10/8/2009 12:00:00 AM from my SQL Server table column "directives_attending_physician_endorsement"):

    new HealthServiceDateTime(new DateTime(Convert.ToInt32(directives_attending_physician_endorsement.Year), Convert.ToInt32(directives_attending_physician_endorsement.Month), Convert.ToInt32(directives_attending_physician_endorsement.Day), Convert.ToInt32(directives_attending_physician_endorsement.Hour), Convert.ToInt32(directives_attending_physician_endorsement.Minute), Convert.ToInt32(directives_attending_physician_endorsement.Second)));

    new HealthServiceDateTime(Convert.ToDateTime(directives_attending_nurse_endorsement));

    new HealthServiceDateTime(directives_attending_nurse_endorsement);

    Friday, December 25, 2009 1:10 AM

Answers

  • Hello Gary,

    I was able to upload the time properly using the below statement,
    RadioLabResults.When = new HealthServiceDateTime(new DateTime(Convert.ToInt32(2009), Convert.ToInt32(10), Convert.ToInt32(8), Convert.ToInt32(12), Convert.ToInt32(0), Convert.ToInt32(0)));

    Please let me know what is the datatype of directives_attending_physician_endorsement.Year (assuming all the other fields are also of the same type) that you are using?

    Thanks and Regards,
    Aneesh D.
    Friday, December 25, 2009 10:01 AM