from mm/dd/yyyy to yyyy/mm/dd

A

Asif Qureshi

The date in my application is in mm/dd/yyyy format which i use in query
to access data from a mini system on network having data in yyyy/mm/dd
format.How can i change my date into yyyy/mm/dd format in query to get
the result.Or tell me any other solution other than changing the Date
Format of my machine.
Thanks in advance.
 
R

Rogas69

In SQL Server (I don't know what database you use) you can use CONVERT
function.
If you have strings in your code you can also use regex to change the order
of parts of the string.

Peter
 
M

Miha Markic [MVP C#]

Hi Asif,

You should really use parametrised queries instead.
See .net help on SqlParameter for example.
 
C

Cor Ligthert

Miha,
You should really use parametrised queries instead.
See .net help on SqlParameter for example.
--

Where is Asif telling that he is using ADONET or even SQL. He is talking
about a MiniSystem.

I am by confused by the answers and am thinking, do I miss something, can
you help me to come out my confusion.

:)

Cor
 
M

Mythran

Cor Ligthert said:
Miha,


Where is Asif telling that he is using ADONET or even SQL. He is talking
about a MiniSystem.

I am by confused by the answers and am thinking, do I miss something, can
you help me to come out my confusion.

:)

Cor

Cor,

He is posting to an adonet newsgroup and asking about queries. If the
answers are incorrect, then the question he wrote should be a little more
explained. If he can send another post explaining, I'm sure all of us can
give better answers :)

Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top