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

  • Thread starter Thread starter Asif Qureshi
  • Start date Start date
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.
 
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
 
Hi Asif,

You should really use parametrised queries instead.
See .net help on SqlParameter for example.
 
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
 
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
 
Back
Top