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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:00:41+00:00 2026-06-18T15:00:41+00:00

Following is the code is used Dim FilterExpression As string Dim oDate as DateTime

  • 0

Following is the code is used

Dim FilterExpression As string
Dim oDate as DateTime

oDate=System.DateTime.Now
 FilterExpression = " quot_date >= '" + oDate.ToString() + "'"

Before Assign oDate contains #2/10/2013 6:10:35 PM# this but when it assign to FilterExpression it becomes quot_date >= '10/02/2013 6:10:35 PM'
Date is changing his format

Any idea why?

  • 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-18T15:00:42+00:00Added an answer on June 18, 2026 at 3:00 pm

    Firstly, that’s VB rather than C#.

    Secondly, the value of oDate is a value of type DateTime. Whereas #2/10/2013 6:10:35 PM is a VB literal of type DateTime, that’s not representation used by DateTime.ToString. It’s using the default format for the current culture – which is apparently one using dd/MM/yyyy hh:mm:ss tt, effectively.

    If you need a specific string representation, you can use a standard or custom string format as an argument to DateTime.ToString, and you can also specify the culture to use. (For example, with a custom string format you may well want to use the invariant culture.)

    However, if you’re trying to use this as a value – for example in a SQL query – it would be better not to need to convert it into a string to start with. You haven’t told us much about what you’re trying to achieve, but I would try to avoid converting it into a string unless you really have to.

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

Sidebar

Related Questions

i have used following code to repeat a process creation/close iteratively dim vProcessInfo as
I swear the following code used to work, even in IE7 but now i
I have used following code to convert string to json and parse it. String
the following code is supposed to replace the system color that's used for window
Following is the code I used to call the child window: Dim c As
I have the following code in Visual Studio 2005. Dim OutFile As System.IO.StreamWriter Try
The following code I used to replace .(dot) by ,(coma) while user inputing value
The following code is used in a query for fetching records. It uses the
The following code is used to fetch logs from app engine for further processing.
here the following code is used to view the present modal view controller. [[self

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.