Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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')
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
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
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
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
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')
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]
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
Great! and if I want to change the time format from 24h to am/pm?
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')