Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Clock

Hello,

I'm trying to insert the date into my project. But I was wondering how can I add the system information (mm/dd/yyyy) or the IP information.

Thank you very much.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try as expression in text box

='Todays date is: ' & Date(today(),'MM/DD/YYYY')

edit: and if you want a apostroph after today

='Today'&chr(39)&'s date is: '&date(today(),'MM/DD/YYY')

View solution in original post

14 Replies
swuehl
MVP
MVP

Hi Juan,

you could use today() function in an object, e.g. text box to display today's date.

With IP, you mean the network IP address, right?

I don't think that there is a system function for that, but search the help for all "system functions".

There is a ComputerName() function and you could query Registry entries or call system functions or use macros to retrieve more information from your system.

Hope that helps,

Stefan

erichshiino
Partner - Master
Partner - Master

hi, Juan

Do you want to include it in the interface? I'm sure about the IP

But you could insert a text box with the following Expressions

=Date( today(), 'MM/DD/YYYY') => to get the system date

=now() => to create a clock (this can be a performance problem since the interface will be refreshed every second)

=osuser() => to get the user login (operational system login)

=qvuser() => to get the name of the user in the case of a section access using name/password

Hope this helps,

Erich

martinpohl
Partner - Master
Partner - Master

for the date I would suggest now() for the system date and time.

For the IP I also don't know if it's possible.

Regards

Anonymous
Not applicable
Author

Ok, that worked fine. Now I want to add some text (strings) and in the middle of that insert the =Date(today(),'MM/DD/YYYY').

How can I do that? i.e: inside the text box: Today's date is: =Date(today(),'MM/DD/YYYY')

And also how can I modify the date format???

El mensaje fue editado por: Juan Escobar

swuehl
MVP
MVP

Try as expression in text box

='Todays date is: ' & Date(today(),'MM/DD/YYYY')

edit: and if you want a apostroph after today

='Today'&chr(39)&'s date is: '&date(today(),'MM/DD/YYY')

Anonymous
Not applicable
Author

That was awesome! now I want to separate the date from the clock? is it any way? like to say

='Today's date is: ' & Date(today(),'MM/DD/YYYY') and is it [the clock]

swuehl
MVP
MVP

You could use something like:

='Today'&chr(39)&'s date is: '&date(today(),'MM/DD/YYY')&' and it is '&time(now())

Please note that now() will refresh the clock permanently, decreasing system performance, consider using now(0) or now(2) instead.

Stefan

Anonymous
Not applicable
Author

Great! and if I want to change the time format from 24h to am/pm?

swuehl
MVP
MVP

You could also specify a time format with time() similar to the date format with date(). Please look into format codes in the help file.

am/pm time format is specified with tt for example, like in

='Today'&chr(39)&'s date is: '&date(today(),'MM/DD/YYY')&' and it is '&time(now(),'hh:mm:ss tt')