hi,
i want to know if this is possible..
i had a timestamp of
12/29/11 03:20 PM
then i want to add 5 minutes breaktime
this will become
12/29/11 03:25 PM
How to add time in timestamp
- mary jhane
- Posts: 73
- Joined: Sat Oct 22, 2011 6:27 am
How to add time in timestamp
OpenOffice 3.3 on Windows XP
Re: How to add time in timestamp
Check the database SQL functions. E.g. TIMESTAMPADD() but likely not available in the build-in HSQLDB of Base.
or do you want to do it on a form? I'm not sure if you can use a e.g. spinner.
or do you want to do it on a form? I'm not sure if you can use a e.g. spinner.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
W11 22H2 (build 22621), LO 7.4.2.3(x64)
- mary jhane
- Posts: 73
- Joined: Sat Oct 22, 2011 6:27 am
Re: How to add time in timestamp
yes im using hsqldb 1.8,
how sad to hear that timestampadd is not available in hsqldb
what is spinner? is this available in hsqldb??
how sad to hear that timestampadd is not available in hsqldb
what is spinner? is this available in hsqldb??
OpenOffice 3.3 on Windows XP
Re: How to add time in timestamp
Hello
When you have the good defined fields then maybe this can help you.
Romke
When you have the good defined fields then maybe this can help you.
Romke
Code: Select all
REM ***** BASIC *****
option explicit
Sub AddTime(oEvent as object)
' Bind to button
dim oButton
dim oForm
const sFieldName="tijd"
dim iIndex
dim TimeValue
oButton=oEvent.source.model
oForm=oButton.parent
iIndex= oForm.findcolumn(sFieldName)
select case "Datestruc"
case "Datestruc"
TimeValue=oForm.getTimestamp(iIndex)
TimeValue.minutes=TimeValue.minutes+ 5 ' add 5 minutes
oForm.updateTimestamp(iIndex,TimeValue)
case "DatesDouble" ' wit a double value
TimeValue=oForm.getdouble(iIndex)
TimeValue=TimeValue+timeserial(0,5,0) ' add 5 minutes
oForm.updatedouble(iIndex,TimeValue)
end select
End Sub
LibreOffice 7.1.4.2 on openSUSE Leap 15.2