ASP.Net convert date string into equivalent date at server Side, UDS formatted string date convesion into date object without considering server timezone
Hi All,

I am working ASP.Net using VB, As per my application need,
I had to capture client side date using java script function. Once I got the date am passing it to server side, where I need to convert it into VB server side code.

I have used conversion statement as given below

-----------------------------------------------------------------------------------------------

Dim dt As New Date()
dt = DateTime.ParseExact("13012014", "ddMMyyyy", CultureInfo.InvariantCulture)

--------------------------------------------------------------------------------------------

Currently in client side, I get the date into "UDS" format like "Mon Jan 13 14:04:08 UTC+0530 2014".

I have formatted it to date as "13012014" and passed to server side.

However, after using ParseExact function with "CultureInfo.InvariantCulture", date gets converted into MST - Mountain time zone

Hence, I am unable to get exact date at server side.

Any help to share function to convert date string into date without considering server time zone will be appreciated... thanks

January 13th, 2014 3:46am

Hello,

This is a forum for MS SQL Server CLR integration; you should post your question to a more related forum like VB.NET or ASP.NET.

Free Windows Admin Tool Kit Click here and download it now
January 13th, 2014 3:51am

Hi Olaf Helper,

Thanks for your suggestion,

For the new user, Could you please provide more information or helpful url to post same Question on VB.NET or ASP.NET. forum?

January 13th, 2014 4:46am

You may try here:

http://forums.asp.net/

Free Windows Admin Tool Kit Click here and download it now
January 13th, 2014 4:54am

Thanks
January 13th, 2014 6:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics