im facing a problem regarding date
19-Nov-19 This date is imputed as 43788 ho my question is how i convert it into date format
im facing a problem regarding date
19-Nov-19 This date is imputed as 43788 ho my question is how i convert it into date format
Please repeat your questio i cant understand 19-nov-19 date u have and what is that 43788?
the expression be like this
DateTime.FromOADate(Convert.ToDouble(“43788”)).ToString(“dd-MMM-yy”)
Cheerss @swanand_deshmukh
Hello @swanand_deshmukh
the number you are getting is also a date but in OA Format so to get the date in your required form use this code
Date.FromOADate(cdbl(yourstringVariable))
this will get the required output in Date Datatype
Hello @swanand_deshmukh
you are assigning a string value to it the code you just applied will give you the date datatype value
if you want it in string
than use this code
Date.FromOADate(cdbl(yourstringVariable)).tostring("dd-MMM-yy")
as also suggested by @Palaniyappan in the earlier post
Execute Non Query: Conversion from string “” to type ‘Double’ is not valid.
yess!! my date format is 18-Nov-19
is any one here plz help me out