Bash OLD history with timestamp - bash

I know about "HISTTIMEFORMAT="%m/%d - %H:%M:%S: " but this will give me history with timestamp from present session to onward and all commands from previous history will have same but incorrect timestamp.
Is there any way I can get let's say one week old history with proper timestamp?

No. You can't.
From here.
If you set the HISTTIMEFORMAT in bash your new entries get stored in the history file with a timestamp, older commands that don't have a timestamp (those before you ever set HISTTIMEFORMAT) will display one and the same date-time-stamp (I assume the one from the first entry found with a real timestamp).

Related

How to use repository or presentation variables in BI publisher?

We have a report on BIP that shows data based on three parameters. One of these is date parameter. What I want to do is to schedule that report to be sent to emails with date parameter set to last 'working' day of last month. Working day means that last day of last month may not be last working day of last month since it may be sunday or some holiday.
For this purpose I created repository variable that gets this working day. When I checked this variable in OBIEE it worked fine. However, in BIP, I couldn't use that variable to set default value of the date parameter.
What can I do? Maybe I can set parameter's default value by SQL expression? Or is there any way to use repo variable in BIP?
In case you haven't searched on Oracle support yet, you can only use repository variables if you use OBIEE as your data source.
syntax: valueof("variable")

How to keep table prompts connected in OBIEE?

I am using OBIEE 12c and have an analysis that contains a table with two table prompts.
What I am getting is that when I choose values for prompts I see the corresponding result, but when I then change the value of one of them, the other one is not keeping its old value. Is it normal way behavior? I want the prompt to keep the old value when the other prompt is changed. Is it possible?
No that's not normal behaviour. Just tried it on 12.2.1.2 and 12.2.1.4 with Firefox and Chrome. For all four combinations the in-line table prompts when you change the second prompt, the first one stays on its selected value. When you change the first prompt then the second one also changes.
This is normal and expected behaviour since you never know if the currently selected value of prompt two actually exists for the - now new - value of prompts one.

Can't get WORKDAY function to work with a COUNTIF

Trying to work on a system at work that will tell how many error codes were registered by a particular machine on the previous workday. This spreadsheet will need to be able to select only the errors generated on the previous date as this will become a rolling list of data generated across a wide time span. Currently working with the formula
=TODAY(),-1,B2:B17)
where the last array is some shutdown days I've put in to generate a global variable "Yesterday" and trying to use the formula
=COUNTIF(Table1[DateOnly],"="&Yesterday)
to gather the number of records that occurred yesterday.
Can anyone tell me where I'm going wrong?
Found that the issue was when I tried to convert the timestamp in mm/dd/yy hh:mm:ss format to mm/dd/yy and didn't realize that the other information was still hiding in there and confusing the formula. One of my coworkers recommended the use of a ROUNDDOWN function in the use of =ROUNDDOWN(argument,0) to get rid of the time information and just leave me with date.

Modifing the Date/Time Stamp of an email message using a Lotus Notes Agent

I've created an agent that copies messages from one folder to another, which works great, but I'd like to modify the Time/Date stamp on the message.
I see a value Date in the Simple Action, but can't find the variable to set the time to "now".
Any help would be greatly appreciated.
you can use formula #Now but you can't modify the date you see in the first tab of document properties, you can only edit the field in the document.

Mongoid DateTime: What is the right date?

I'm using Mongoid to store DateTime. But now i'm confusing with the real date.
In mongodb , the date is stored as:
{"2013-01-14T12:50:00.000Z"}
But when i print that value, it says:
2013-01-14T19:50:00+07:00
I don't really understand whether those Date formats are the same, and which one is "right" in my current timezone ?
Thank you for your help.
Date is stored in GMT, when "printed", it is displayed in your local timezone (GMT+7?)
The default Ruby date object should be able to handle offsets in time:
http://ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/Date.html
Whereby some way down the page it even talks about how to start manipulating it I believe:
An optional argument the offset indicates the difference between the local time and UTC.
I do believe that mongoid is already converting the time for you as can be seen by the T value within the iso date being 7 hours ahead:
2013-01-14T19:50:00+07:00
Merely if you were to print the date and/or time instead of the full output with the offset included I have no doubt you will get the real date.
I believe mongoid most likely prints the offset even when it is applied because that offset IS there (since the time is off-setted by 7 hours from UTC) it is just not applied further.

Resources