DateTime data insert to sql server

Hi @Anil_G

Thanks :). i can able to insert the data in sql server…

but i have on issue… wrong data inserted to sql server…

Time is missing…

Thanks
Shyam

1 Like

HI @Shyam_Pragash

Please use DateTimeValue(Variable) instead of DateValue

Happy Automation

cheers

DateTimeValue function not available… can u tell me how to add ?

Thanks
Shyam

Hi @Shyam_Pragash

Try timevalue or a combination of datevalue and timevalue

cheers

Hi @Anil_G @RajKumar_DC

Thanks All :slight_smile: :+1:

Finally we found the soluation to import Null data with specificed variable types in sql server.

If ( String.IsNullOrEmpty(Exl_Created_At), New Nullable(Of Date), System.Convert.ToDateTime(Exl_Created_At))

Variable Type : Nullable.System.Datetime

Thanks
Shyam

1 Like

The simplest method to insert the current date and time in MySQL is to use the now() function. Once you call the function, it returns the current date and time in the system’s configured time zone as a string. The value returned from the now() function is YYYY-MM-DD for the date and HH-MM-SS-UU for the time record.

Regards,
Will

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.