Using Timestamp or Date in textfield

Ask general questions here.
nnorbi
Posts: 5
Joined: Tue Dec 18, 2018 1:43 pm

Using Timestamp or Date in textfield

Post by nnorbi » Wed Dec 19, 2018 12:36 pm

Hi!

I need a little helt. I recording some action from desktop application. I need insert the current system date one of the Text field.

How can I do that?

Many Thanks :)

manish
Posts: 45
Joined: Fri Aug 10, 2018 12:46 pm

Re: Using Timestamp or Date in textfield

Post by manish » Wed Dec 19, 2018 3:32 pm

Hi nnorbi,

You can get the current system time using the below code:

Code: Select all

 string systime  = System.DateTime.Now.ToString("dd_MM_yyyy_hh_mm_ss"); 
Of course, you can specify your own time format.

nnorbi
Posts: 5
Joined: Tue Dec 18, 2018 1:43 pm

Re: Using Timestamp or Date in textfield

Post by nnorbi » Thu Dec 20, 2018 11:46 am

Thank you :)