Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8629227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:44:59+00:00 2026-06-12T08:44:59+00:00

I am using the following link’s code to process metadata fields:- https://code.google.com/p/tridion-practice/wiki/ChangeContentOrMetadata But when

  • 0

I am using the following link’s code to process metadata fields:-

https://code.google.com/p/tridion-practice/wiki/ChangeContentOrMetadata

But when I try to assign value to metadata field of date type then I am getting the following xml validation error:-

”
System.ServiceModel.FaultException`1
[myPorject.serviceReference.CoreServiceFault]: XML validation error. Reason: The ‘uuid:myUUID:dateField’ element is invalid – The value ’10/4/2012 03:04:00 AM’ is invalid according to its datatype ‘http://www.w3.org/2001/XMLSchema:dateTime’ – The string ’10/4/2012 03:04:00 AM’ is not a valid DateTime value.. (Fault Detail is equal to
myPorject.serviceReference.CoreServiceFault)”

No matter whether I assign the value as string or DateTime data type I am getting the same error, I have also tried to overload the AddValue method with a Datetime data type but nothing has worked so far.

AddValue method’s code snippet:-

     public void AddValue(string value1)
    {
        string value = string.IsNullOrEmpty(value1) ? null : value1; ;
        XmlElement newElement = fields.AddFieldElement(definition);
        if (value != null) newElement.InnerText = value;
    }

Please suggest solution for both Date and Number data type. Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:45:00+00:00Added an answer on June 12, 2026 at 8:45 am

    After some trouble shooting I finally resolve the issue and along with format of date. For this I need to match the time zone of my local machine with the server’s Time zone.

    And below is the code of overloaded method:-

          public void AddValue(DateTime value1)
        {
            DateTime value = value1 == null ? DateTime.MinValue : value1;
    
            XmlElement newElement = fields.AddFieldElement(definition);
            if (value != null) newElement.InnerText = value.ToString("yyyy-MM-ddThh:mm:ss");
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using bitlyj snapshot jar to shorten URLs from the following link. http://code.google.com/p/bitlyj/downloads/list
I am using the code listed on the following link: http://www.magentocommerce.com/wiki/5_-_modules_and_development/catalog/programmatically_adding_attributes_and_attribute_sets Everything works until
I am opening youtube link in webview using following code. [self playVideo:@www.youtube.com/watch?v=GcpFTAqvLYQ frame:CGRectMake(0, 44,
i am trying to run google map tutorial using following link http://mobiforge.com/developing/story/using-google-maps-android followed all
I have created a listview using following tutorial link http://www.ezzylearning.com/tutorial.aspx?tid=1763429 Outcome of this is,
I'm currently using the following code to append a X link to each element
I am learning expression blend using the following link http://visitmix.com/labs/rosetta/EyesOfBlend/DataTemplates/ It is a very
Let say we've the following hyper link code <a id=cont href=www.first_site.com>Something</a> and i'd like
I am doing an application where I am using the following link http://iosdevelopertips.com/cocoa/date-formatters-examples-take-3.html to
I am using the following link for using the Google Cloud Storage : Google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.