By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,560 Members | 2,989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,560 IT Pros & Developers. It's quick & easy.

Date conversion pb

P: n/a
Hi,
'm gettin mad about date conversion.

Here is the point.
Got and add-in for Excel which call functions from a web service (on a
remote server)

The remote server has regional settings set to "en-UK" and date to
dd/MM/yyyy. (I'can't change it !)

One of my function get a string as parameter and convert it to date in
the following format yyyy-mm-dd.

So, Having regional settings set to "fr-ch" (date format dd.mm.yyyy), I
call my function with "31/10/2003"... Works grate (with every date).

Changing regional settings to "en-US" and date to default "M/d/yyyy",
the function do not recognize the date.

I tried to set CurrentThread culture to a specific one, I tried
Date.Parse... I must miss somethin...

Is there a way to get back client date format during request and
convert date regarding this format ?

Help Please !

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Have u tried using ParseExact.
Can you give the date string and the exception that you are getting when
using Parse,.

HTH
rawCoder
"Franck" <we**********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hi,
'm gettin mad about date conversion.

Here is the point.
Got and add-in for Excel which call functions from a web service (on a
remote server)

The remote server has regional settings set to "en-UK" and date to
dd/MM/yyyy. (I'can't change it !)

One of my function get a string as parameter and convert it to date in
the following format yyyy-mm-dd.

So, Having regional settings set to "fr-ch" (date format dd.mm.yyyy), I
call my function with "31/10/2003"... Works grate (with every date).

Changing regional settings to "en-US" and date to default "M/d/yyyy",
the function do not recognize the date.

I tried to set CurrentThread culture to a specific one, I tried
Date.Parse... I must miss somethin...

Is there a way to get back client date format during request and
convert date regarding this format ?

Help Please !

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.