Hi,
I have a date attribute and a timestamp attribute BUT the format is HH:mm
Based on this two attributes I want to create a new timestamp attribute
Is there a function in Aware that will allow me to do this?
recreate timestamp
recreate timestamp
Thanks in advance!
Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
Re: recreate timestamp
Cris,
Take a look at this post to see if you can get it to work:
http://www.awareim.com/forum/viewtopic. ... =date_part
Take a look at this post to see if you can get it to work:
http://www.awareim.com/forum/viewtopic. ... =date_part
Henrik (V8 Developer Ed. - Windows)
Re: recreate timestamp
Hi,hpl123 wrote:Cris,
Take a look at this post to see if you can get it to work:
http://www.awareim.com/forum/viewtopic. ... =date_part
Thanks for replying. Yeah saw that post already but the problem is that the time is a constant time.
I tried to do the following but Aware is coming up with an error "exception while saving the object null".
TIMESTAMP(DAY_OF_MONTH(MyBO.Work_Date),MONTH(MyBO.Work_Date),MyBO(Timesheet.Work_Date),HOUR(MyBO.TimeFrom),MINUTE(MyBO.TimeFrom))
Also, why is the HOUR function expecting a date parameter which I find a bit weird?
maybe a TIME_PART function on the next build? Since we already have a DATE_PART that extracts only the date component of a timestamp attribute
Thanks in advance!
Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
Re: recreate timestamp
Cris,
Try going over how you use the function. What you wrote for example don´t look right:
TIMESTAMP(DAY_OF_MONTH(MyBO.Work_Date),MONTH(MyBO.Work_Date),MyBO(Timesheet.Work_Date),HOUR(MyBO.TimeFrom),MINUTE(MyBO.TimeFrom))
and also you don´t have YEAR as part of the function?
I have used this function before to do similar things but took me quite a few tries to get it working (syntax has to be correct etc.)
Try going over how you use the function. What you wrote for example don´t look right:
TIMESTAMP(DAY_OF_MONTH(MyBO.Work_Date),MONTH(MyBO.Work_Date),MyBO(Timesheet.Work_Date),HOUR(MyBO.TimeFrom),MINUTE(MyBO.TimeFrom))
and also you don´t have YEAR as part of the function?
I have used this function before to do similar things but took me quite a few tries to get it working (syntax has to be correct etc.)
Henrik (V8 Developer Ed. - Windows)
Re: recreate timestamp
Try something like this:
BO.MyTimeStamp=AS_TIMESTAMP(AS_STRING(BO.TheDate, 'MM/dd/yy')+AS_STRING(BO.TheTime,'HH:mm'), 'MM/dd/yyHH:mm')
BO.MyTimeStamp=AS_TIMESTAMP(AS_STRING(BO.TheDate, 'MM/dd/yy')+AS_STRING(BO.TheTime,'HH:mm'), 'MM/dd/yyHH:mm')
Bob
Re: recreate timestamp
thanks for the advice, will dohpl123 wrote:Cris,
Try going over how you use the function. What you wrote for example don´t look right:
TIMESTAMP(DAY_OF_MONTH(MyBO.Work_Date),MONTH(MyBO.Work_Date),MyBO(Timesheet.Work_Date),HOUR(MyBO.TimeFrom),MINUTE(MyBO.TimeFrom))
and also you don´t have YEAR as part of the function?
I have used this function before to do similar things but took me quite a few tries to get it working (syntax has to be correct etc.)
Thanks in advance!
Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme