Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following variable:
LET vYEAR = YEAR(TODAY())-3; // vYEAR = 2014
What I need is to create 2 more variables with the following values:
vSTART = 20150701 06:00:00 hs // 1st day of july at 6 am from vYEAR+1
vEND = 20171001 06:00:00 hs // 1st day of current month at 6 am from current year
(*) Date format: YYYYMMDD hh:mm:ss
Do you know how could I get those values to use them in variables?
Thank you!
another one
LET vYEAR = YEAR(TODAY())-3; // vYEAR = 2014
LET vSTART = Date(Makedate(vYEAR+1, 7) + 6/24, 'YYYYMMDD hh:mm:ss');
LET vEND = Date(MonthStart(Today()) + 6/24, 'YYYYMMDD hh:mm:ss');
Maybe something like this:
LET vStart = Date( YearStart( MakeDate(2014) ) , 'YYYYMMDD') & ' 06:00:00 hs'
LET vEnd = Date( MonthStart( today() ), 'YYYYMMDD' ) & ' 06:00:00 hs'
Good luck
Oscar
or
LET vStart = Date( YearStart( MakeDate(2014) ) , 'YYYYMMDD') & ' ' & MakeTime( 6,0,0 )
LET vEnd = Date( MonthStart( today() ), 'YYYYMMDD' ) & ' ' & MakeTime( 6,0,0 )
Thanks
Oscar
May be this
SET DateFormat='YYYYMMDD';
SET TimestampFormat='YYYYMMDD hh:mm:ss[.fff]';
LET vSTART = TimeStamp('20150701 06:00:00')&' hs';
LET vEND = Timestamp(MonthStart(Today())&' '&'06:00:00')&' hs';
another one
LET vYEAR = YEAR(TODAY())-3; // vYEAR = 2014
LET vSTART = Date(Makedate(vYEAR+1, 7) + 6/24, 'YYYYMMDD hh:mm:ss');
LET vEND = Date(MonthStart(Today()) + 6/24, 'YYYYMMDD hh:mm:ss');