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 6113155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:49:35+00:00 2026-05-23T14:49:35+00:00

I am developing an ASP.Net C# web application that should access the database using

  • 0

I am developing an ASP.Net C# web application that should access the database using ODBC then pass the gotten data to a web service.

I face a problem in converting date as I tried using Convert.ToDateTime and parseDate to change the format of the dates acccessed from the database and change it to the suitable formate needed for the web service.
for example:

the database datetime storage format is "MM/dd/yyyy hh:mm:ss tt"
07/15/2011 03:05:10 pm
the webservice datetime storage format is "dd/MM/yyyy hh:mm:ss"
15/07/2011 15:00:00

How I can change and convert these different formats for datetime data types so that the web service accepts it properly?

Also, there is a boolean data type in the web service which is stored as integer in the database, how I can handle that so that the web service accepts the boolean data type in a correct way?

for example:

the isGiven variable may have the value of 0 in database while it should be false or true in the web service as it accepts it as boolean only.
is there an implicit conversion between int and bool data types?
  • 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-05-23T14:49:36+00:00Added an answer on May 23, 2026 at 2:49 pm

    the database datetime storage format is “MM/dd/yyyy hh:mm:ss tt”

    No, it’s not. The database doesn’t store the datetime value as a formatted string, it stores it numerically representing a point in time. When you read it you get it as a DateTime value, not a string.

    To convert the DateTime value to the format dd/MM/yyyy hh:mm:ss you just use a custom format string:

    theDate.ToString("dd'/'MM'/'yyyy HH':'mm':'ss")
    

    Converting an integer to a boolean can either be done when you read it from the database:

    cast(isGiven as bit)
    

    or afterwards:

    reader["isGiven"] != 0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a data-driven web application using ASP.Net MVC 3. I will be
I am developing an iPhone application that GETS data from my ASP.NET web service
I am developing an ASP.NET web application that incorporates google maps. I have an
I'm developing a web application using ASP .NET MVC 1.0 and jQuery (including the
I am developing an ASP.NET intranet web application that provides short quizzes to the
I am developing a web application using Asp.net mvc framework with concept of sub
I am developing an asp.net mvc web application that makes much use of jquery
We are developing an asp.net 2.0 web application in that user can sign-up or
I'm developing an asp.net webservice application to provide json-formatted data to a widget that
I am developing an ASP.NET MVC 3 web application using Razor and C#. I

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.