Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II

use MakeTime and MakeDate together

Hi,

I need to load date which is less than specific date. here in date it has to be in 'YYYY-MM-DD hh:mm' format.

Here date is reload date and hh:mm is MakeTime(6,30).

MakeTime value is dynamic.

so how can i get

mydate < reloaddate in 'YYYY-MM-DD' and Maketime(6,30)

15 Replies
Anonymous
Not applicable

Do you want to create this MYDate field or you already have this?

anuradhaa
Partner - Creator II
Author

I already have that

Anonymous
Not applicable

will this work?

like:

load

date(MyDateField,'YYYY-MM-DD') as MyDateField

From tablename where num(MyDateField)<=num(reloaddate)

Anonymous
Not applicable

Making time from your MyDateField seems tough..

For that I guess you need to go for looping to make time field...

Kushal_Chawda

what is the format of Your date?

jyothish8807
Master II

Hi Anuradha,

Try like this:

load

date(Your field,'YYYY-MM-DD h:mm:ss[.fff] TT')) as Yourfield,

reloaddate

from <>

where date(Your field,'YYYY-MM-DD h:mm:ss[.fff] TT')) < reloaddate;

Hope it helps

Regards

KC

Best Regards,
KC
anuradhaa
Partner - Creator II
Author

YYYY-MM-DD hh:mi:ss

anuradhaa
Partner - Creator II
Author

No, I want to dinamicaly calculate that date i want to use in where clause.

Get Date from reload date and time from my expression.

I know how to calculate that time.

But i don't know how to join that date and time inside where clause.

Say my time is 06:30 and date is 2015-11-09

i want to use

myDate < 2015-11-09 06:30 in where clause

jyothish8807
Master II

And yes, if reload time is combination of two fields then please combine them and make one field and use in script.

Load

date(Your field,'YYYY-MM-DD h:mm:ss[.fff] TT')) as Yourfield,

date(ReloadTime() ,'YYYY-MM-DD') &'  '& MakeTime(6,3) as reloaddate

where date(Your field,'YYYY-MM-DD h:mm:ss[.fff] TT')) <date(ReloadTime() ,'YYYY-MM-DD') &'  '& MakeTime(6,3)

Regards

KC

Best Regards,
KC