Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Define system date in script

Hi,

how can i set the system date to a date of my choosing?

For example:

SET SYSDATE = '09/09/2014'

in order that Today() = 09/09/2014

Tx

6 Replies
Anonymous
Not applicable
Author

Hi Niccolo,

Do you mean formatting of system date.

If  so please check below:

LET vStartDate = date(today(),'DD-MM-YYYY');

Regards

Neetha

its_anandrjs

Hi,

If you want to set your start date or make your choosing today date then write a variable like

Let vToday  = Date('09/09/2014','DD/MM/YYYY')

Regards

Anand

Anonymous
Not applicable
Author

Hi,

something similar to that: but i am not using a variable vToday, but i am using the function today().

I guess that the date that is referred to today() is some kind of sys date that i need to modify.

How do i do that?

tx

maxgro
MVP
MVP

- you can set a variable at the date you want (as Anand suggested)

- but can't change the result of today() function because it use the system clock (well if you change your computer date / time you can)

today([timer_mode] )

Returns the current date from the system clock. The timer_mode may have the following values:

0 Date at script run
1 Date at function call
2 Date when the document was opened  

its_anandrjs

Hi,

No i think that is not possible when use Today() or Now() they returns the system today date and time. But if you need the 09/09/2014 exactly for today date in the date model then use variable and use Addmonth( ) function to get date dynamically.

Regards

Anand

Anonymous
Not applicable
Author

I guess you want to do this for testing using QV Desktop.

If that is the case then have a look at the RunAsDate utility, Google it and you'll find it.