Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How i will get current time and date from application server ?

Former Member
0 Kudos
23,859

Hi,

How i will get current time and date from application server ? Means i want to show application server current time and date .

Regards,

Gurprit Bhatia

1 ACCEPTED SOLUTION

Former Member
2,071

Hi

for date- sy-datum

for time - sy-uzeit.

Regards

Aditya

7 REPLIES 7

Former Member
2,072

Hi

for date- sy-datum

for time - sy-uzeit.

Regards

Aditya

former_member705122
Active Contributor
0 Kudos
2,071

Hi,

Use System fields.

sy-datum for date,

sy-uzeit for time.

Regards

Adil

0 Kudos
2,071

Hi,

No sy-datum is not working. it shows presentation server time and date.

Regards,

Gurprit Bhatia

0 Kudos
2,071

Hello


DATA: 
  s_tst TYPE timestamp, 
  l_tst TYPE timstampl, 
  tzone TYPE timezone. 

GET TIME STAMP FIELD s_tst.         "Short form 
GET TIME STAMP FIELD l_tst.         "Long form 
tzone = 'UTC   '.                   "Time zone 

WRITE: / s_tst TIME ZONE tzone, 
       / l_tst TIME ZONE tzone. 

0 Kudos
2,071

hi gurprit,

it shows application server time only.

Go through this link.

Here clearly mention.

[link|http://help.sap.com/saphelp_46c/helpdata/EN/7b/fb96c8882811d295a90000e8353423/content.htm#U]

ragards,

sandeep

Former Member
0 Kudos
2,071

Hi Gurprit,

You can get the current date and time by using system fields,

SY-DATUM and SY-UZEIT.

Regards,

Chandra Sekhar

Former Member
0 Kudos
2,071

hi gurprit,

Data : sy-datum

Time : sy-uzeit

or check the system -> status .

this one also give application server time.

regards,

sandeep