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

  • Home
  • SEARCH
  • 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 8933237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:29:28+00:00 2026-06-15T09:29:28+00:00

I am posting data to my web api, one of the parameters I am

  • 0

I am posting data to my web api, one of the parameters I am posting is a date selecteed by a date picker.

Below is the post data to the action (got these values from firebug)

EndDate : "18/10/2012" (Note: the format is : dd/mm/yyyy)

ABC : "do not bother…"

XYZ : "do not bother…"

LMNO : "do not bother…"

Now in my controller I have a class with the above 3 string fields and one date field

public class PostModel{

  public string ABC {get;set;}
  public string XYZ {get;set;}
  public string LMNO {get;set;}
  public DateTime EndDate {get;set;}
}

in my web api which looks somewhat like the one shown below

public Something PostSomething(PostModel model)
{}

here I am getting the value of EndDate in the format of "mm/dd/yyyy". What I want is "dd/mm/yyyy".

So for this I have also added a entry in the web.config file as follows…

<system.web>
<globalization uiCulture="en-GB" culture="en-GB" />
</system.web>

This still doesnt help, please can someone tell me what wrong I am doing ?

MORE SHOCKING DISCOVERY !!!

I just tried this out with a normal controller instead of web api controller and it worked for the non – api controller. Has any body else come across this problem ??

For the normal action (non web api) I didnt even had to set any culture for this.

please help.

  • 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-15T09:29:30+00:00Added an answer on June 15, 2026 at 9:29 am

    Changed my End Date date time field to string and then posted this end date as string to my controller.

    Then in controller converted this string to date using DateTime.Parse().

    I know that this not the best solution one would want, but this gets the job done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got the below JavaScript posting data when it is able to determine as
I've got a web API that provides data to users without authentication (the website
So, I've got a SMS service posting data to an ASP page. The data
[background below] I've got my data modelled out in SQLObject in Python on the
I have an application in which I am posting data to my server API
My case is, when someone is posting to my news web data with 600k
I am wanting to expose a restful web service for posting and retrieving data,
I am looking forward for posting some data and information on the web server
I need to implement posting some data to a web server in the background.
We have a ReST Web Service that uses POST - to insert data into

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.