<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143184#M185023</link>
    <description>&lt;P&gt;I am on leave for some three to four days ... I can check this on 8th of this month ... &lt;/P&gt;

&lt;P&gt;Because I am not having the server access from outside network ... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Thanks for a help ...&lt;/P&gt;</description>
    <pubDate>Fri, 03 Oct 2014 04:01:11 GMT</pubDate>
    <dc:creator>siraj198204</dc:creator>
    <dc:date>2014-10-03T04:01:11Z</dc:date>
    <item>
      <title>i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143162#M185001</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(now(),"+90d@d"), "%Y/%m/%d %H:%M") |rename lastPasswordChange as lastpasswordchangedate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is search is calculating the exp date is 90 days from today date . I am trying to get lastPasswordChange date to 90days exp date.&lt;/P&gt;

&lt;P&gt;my output,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;application =TFAYD
exp_date =2014/12/25 00:00
lastpasswordchangedate =2014-08-06 11:11:43
owner =501936069
refreshedDate =2014-09-26 12:16:36
sourcetype =mysql
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The now() command is returning the current date , so this query is returning the &lt;CODE&gt;exp_date =2014/12/25 00:00&lt;/CODE&gt; , i want to return lastpasswordchangedate, so that i will get exp date 90days calculating from lastpasswordchangedate .&lt;/P&gt;

&lt;P&gt;lastpasswordchangedate is a one of the field in splunk , i want to return this field value in splunk &lt;CODE&gt;(lastpasswordchangedate =2014-08-06 11:11:43&lt;/CODE&gt;) , so that i can get the exp_date value 90days from the lastpasswordchange date ,&lt;/P&gt;

&lt;P&gt;in the same place , instead of &lt;CODE&gt;now()&lt;/CODE&gt; , if i place lastpasswordchangedate it is not returning the lastpasswordchangedate value ...&lt;/P&gt;

&lt;P&gt;any one can help on this .....&lt;/P&gt;

&lt;P&gt;Thanks and Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2014 20:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143162#M185001</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-09-26T20:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143163#M185002</link>
      <description>&lt;P&gt;Try this (based on your sample value, if the format of date is changed, updated the strptime parameter accordingly)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |rename lastPasswordChange as lastpasswordchangedate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |rename lastPasswordChange as lastpasswordchangedate | eval DaysToExpire=round((strptime(exp_date,"%Y-%m-%d %H:%M:%S")-strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"))/86400)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Sep 2014 21:08:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143163#M185002</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-09-26T21:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143164#M185003</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;It is working good, Now i am trying to write the output for Expire day . I think it is (lastPasswordChange-exp_date) .  exp day is the final output for this query . &lt;/P&gt;

&lt;P&gt;Thank u ,  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj,Hi , &lt;/P&gt;

&lt;P&gt;Thank u , it is working good . Now i am trying to write the output for expire day . it is (lastPasswordChange-exp_date)  expire day .&lt;/P&gt;

&lt;P&gt;Thank a lot , &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj &lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 11:44:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143164#M185003</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-09-29T11:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143165#M185004</link>
      <description>&lt;P&gt;We are calculating exp_date as relative time of lastPasswordChange date, so its always going to be 90 days. My guess is that yiu want to calculate it based on now () so that you'll get how many days left for expiry. Correct me if I'm wrong. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 12:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143165#M185004</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-09-29T12:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143166#M185005</link>
      <description>&lt;P&gt;source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |rename lastPasswordChange as lastpasswordchangedate   , &lt;/P&gt;

&lt;P&gt;This query is working good , &lt;/P&gt;

&lt;P&gt;my output is ,&lt;/P&gt;

&lt;P&gt;application =TFAYD&lt;BR /&gt;
exp_date =2014-11-04 00:00:00 ( it is correct, calculating from lastPasswordChange)&lt;BR /&gt;
lastpasswordchangedate =2014-08-06 11:11:43&lt;BR /&gt;
owner =501936069&lt;BR /&gt;
refreshedDate =2014-09-29 09:15:24&lt;BR /&gt;
sourcetype =mysql &lt;/P&gt;

&lt;P&gt;it is working good exp_date is working good  , i need one more output ...  exp_day  format , for example &lt;/P&gt;

&lt;P&gt;90days,89days,88days password can expire like that .... &lt;/P&gt;

&lt;P&gt;So expiredays= 90days,89days,88days. &lt;/P&gt;

&lt;P&gt;we have calculate same this also from lastpassword change date ... &lt;/P&gt;

&lt;P&gt;please help me on this .... &lt;/P&gt;

&lt;P&gt;Thank you ... &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj, source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |rename lastPasswordChange as lastpasswordchangedate   , &lt;/P&gt;

&lt;P&gt;This query is working good , &lt;/P&gt;

&lt;P&gt;my output is ,&lt;/P&gt;

&lt;P&gt;application =TFAYD&lt;BR /&gt;
exp_date =2014-11-04 00:00:00&lt;BR /&gt;
lastpasswordchangedate =2014-08-06 11:11:43&lt;BR /&gt;
owner =501936069&lt;BR /&gt;
refreshedDate =2014-09-29 09:15:24&lt;BR /&gt;
sourcetype =mysql &lt;/P&gt;

&lt;P&gt;it is working good exp_date is working good  , i need one more output ...  exp_day  format , for example &lt;/P&gt;

&lt;P&gt;90days,89days,88days password can expire like that .... &lt;/P&gt;

&lt;P&gt;So expiredays= 90days,89days,88days. &lt;/P&gt;

&lt;P&gt;we have calculate same this also from lastpassword change date ... &lt;/P&gt;

&lt;P&gt;please help me on this .... &lt;/P&gt;

&lt;P&gt;Thank you ... &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143166#M185005</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143167#M185006</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |eval exp_day=exp_date - lastPasswordChange | where exp_date &amp;lt; strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d"),"%Y-%m-%d %H:%M:%S") |rename lastPasswordChange as lastpasswordchangedate ,  &lt;/P&gt;

&lt;P&gt;I am trying to get the exp_day , &lt;/P&gt;

&lt;P&gt;|eval exp_day=exp_date-lastPasswordChange | where exp_date &amp;lt; strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d"),"%Y-%m-%d %H:%M:%S")  &lt;/P&gt;

&lt;P&gt;This exp_day query  is correct ? correct me if i am wrong  .... i am trying to get the expire day .... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
any can help me on this ...&lt;/P&gt;

&lt;P&gt;other output is good , &lt;/P&gt;

&lt;P&gt;other outputs are,&lt;/P&gt;

&lt;P&gt;application =TFAYD &lt;BR /&gt;
exp_date =2014-11-04 00:00:00 ( it is correct, calculating from &lt;BR /&gt;
lastPasswordChange) &lt;BR /&gt;
lastpasswordchangedate =2014-08-06 11:11:43 &lt;BR /&gt;
owner =501936069 &lt;BR /&gt;
refreshedDate =2014-09-29 09:15:24 &lt;BR /&gt;
sourcetype =mysql &lt;/P&gt;

&lt;P&gt;Trying to add the field for exp_day ..... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thank u ...&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;BR /&gt;
,source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |eval exp_day=exp_date-lastPasswordChange | where exp_date &amp;lt; strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d"),"%Y-%m-%d %H:%M:%S") |rename lastPasswordChange as lastpasswordchangedate ,  &lt;/P&gt;

&lt;P&gt;I am trying to get the exp_day , &lt;/P&gt;

&lt;P&gt;|eval exp_day=exp_date-lastPasswordChange | where exp_date &amp;lt; strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d"),"%Y-%m-%d %H:%M:%S")  &lt;/P&gt;

&lt;P&gt;This exp_day query  is correct ? correct me if i am wrong  .... i am trying to get the expire day .... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
any can help me on this ...&lt;/P&gt;

&lt;P&gt;other output is good , &lt;/P&gt;

&lt;P&gt;other outputs are,&lt;/P&gt;

&lt;P&gt;application =TFAYD &lt;BR /&gt;
exp_date =2014-11-04 00:00:00 ( it is correct, calculating from &lt;BR /&gt;
lastPasswordChange) &lt;BR /&gt;
lastpasswordchangedate =2014-08-06 11:11:43 &lt;BR /&gt;
owner =501936069 &lt;BR /&gt;
refreshedDate =2014-09-29 09:15:24 &lt;BR /&gt;
sourcetype =mysql &lt;/P&gt;

&lt;P&gt;Trying to add the field for exp_day ..... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thank u ...&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:44:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143167#M185006</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143168#M185007</link>
      <description>&lt;P&gt;Hi , &lt;/P&gt;

&lt;P&gt;I want to minus this , &lt;/P&gt;

&lt;P&gt;lastpasswordchangedate =2014-08-06 11:11:43    and  exp_date =2014-11-04 00:00:00 , and convert it as a number of days , &lt;/P&gt;

&lt;P&gt;any one can help me on this ... &lt;/P&gt;

&lt;P&gt;Thanks u ..&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 15:40:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143168#M185007</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-09-30T15:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143169#M185008</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;actually we have a expire date , by using we have to found exp_day , &lt;/P&gt;

&lt;P&gt;it is expdate-currentdate(now()),   it is should in the format of days ... 35days,34days,....&lt;/P&gt;

&lt;P&gt;,source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M")   &lt;/P&gt;

&lt;P&gt;Exp Day query samples , &lt;/P&gt;

&lt;P&gt;| convert dur2sec(now()) as reqTimeConverted | convert dur2sec(expdate) as respTimeConverted | eval dur_in_sec=respTimeConverted-reqTimeConverteds  |eval newout=tostring(dur_in_sec,"duration")&lt;/P&gt;

&lt;P&gt;in this query , tostring is not accepting the field values ....  it can accept only number in seconds .&lt;/P&gt;

&lt;P&gt;any one can help me on this ... &lt;/P&gt;

&lt;P&gt;Thanks u ,&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:45:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143169#M185008</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143170#M185009</link>
      <description>&lt;P&gt;Try this then&lt;/P&gt;

&lt;P&gt;source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |rename lastPasswordChange as lastpasswordchangedate | eval DaysToExpire=tostring(strptime(exp_date,"%Y-%m-%d %H:%M:%S")-now(),"duration")&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143170#M185009</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T17:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143171#M185010</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I tried this, i am not getting output for DaysToExpire , Generally In the tostring command , if we are giving the input as a seconds, it is generating the output as or converting to days .... not getting the field of DaysToExpire ...&lt;/P&gt;

&lt;P&gt;Thank u ,&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 11:12:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143171#M185010</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-01T11:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143172#M185011</link>
      <description>&lt;P&gt;actually inside of the tostring command we are giving the field value , it can convert to days and hours,minute,seconds ,  but i think the tostring command need direct input of seconds , then only it can convert it in to days ... &lt;/P&gt;

&lt;P&gt;exp_day output we have to convert as a seconds, that seconds output we have to submit in tostring command , &lt;/P&gt;

&lt;P&gt;example , expire_day=tostring(seconds,"duration")&lt;/P&gt;

&lt;P&gt;seconds  we have to  calculate for expiry day ..&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 11:15:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143172#M185011</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-01T11:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143173#M185012</link>
      <description>&lt;P&gt;i have one sample query , &lt;/P&gt;

&lt;P&gt;| gentimes start=now() end=exp_date | search starthuman!="Sun*" starthuman!="Sat*" | stats count &lt;/P&gt;

&lt;P&gt;it can calculate the number of days between exp_date and current  date ... but this query is not working ,,,,&lt;/P&gt;

&lt;P&gt;Thank u ,&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143173#M185012</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143174#M185013</link>
      <description>&lt;P&gt;Hi somesoni,&lt;/P&gt;

&lt;P&gt;eval compare=strptime(exp_date,"%Y-%m-%d %H:%M:%S") | where compare&amp;gt;strptime(now(),"%Y-%m-%d %H:%M:%S")&lt;/P&gt;

&lt;P&gt;I tried this to compare two fields , to get number of day of password expire ....&lt;BR /&gt;
but not getting the result ....&lt;/P&gt;

&lt;P&gt;Thank u ,&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 19:34:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143174#M185013</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-01T19:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143175#M185014</link>
      <description>&lt;P&gt;Hi somesoni,&lt;/P&gt;

&lt;P&gt;eval compare=strptime(exp_date,"%Y-%m-%d %H:%M:%S") | where compare&amp;gt;strptime(now(),"%Y-%m-%d %H:%M:%S")&lt;/P&gt;

&lt;P&gt;I tried this to compare two fields , to get number of day of password expire ....&lt;BR /&gt;
but not getting the result ....&lt;/P&gt;

&lt;P&gt;Thank u ,&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 19:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143175#M185014</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-01T19:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143176#M185015</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
source="dbmon-tail://idwarehouse/idw_account" application=TFAYD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M") |rename lastPasswordChange as lastpasswordchangedate | eval DaysToExpire=tostring(strptime(exp_date,"%Y-%m-%d %H:%M:%S")-now(),"duration")&lt;/P&gt;

&lt;P&gt;in this query , splunk is not accepting the - symbol with command ....    example -now()  ... &lt;/P&gt;

&lt;P&gt;Thank u , &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:46:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143176#M185015</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143177#M185016</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;1.we have a  current date , now()&lt;BR /&gt;
2.we have a expire date .&lt;BR /&gt;
 1. command tostring only gives seconds as output ... &lt;/P&gt;

&lt;P&gt;example , |eval  exp_day=(86400,"duration")    it is outputs,&lt;/P&gt;

&lt;P&gt;exp_day=90+  (90days)&lt;/P&gt;

&lt;P&gt;exp_day-now() .....   output ... 36+,35+,34+&lt;/P&gt;

&lt;P&gt;trying to get the answer ... &lt;/P&gt;

&lt;P&gt;Thank u , &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 19:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143177#M185016</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-01T19:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143178#M185017</link>
      <description>&lt;P&gt;Hi , &lt;/P&gt;

&lt;P&gt;host="sample" | convert dur2sec(Out_Time) dur2sec(In_Time) | eval diff=(Out_Time - In_Time) | eval Newfield=tostring(diff, "duration") | table Newfield&lt;/P&gt;

&lt;P&gt;this is sample command , &lt;/P&gt;

&lt;P&gt;|convert dur2sec(exp_date) dur2sec(now())  |eval diff=(exp-date-now())  |eval exp_day=tostring(diff,"duration")  &lt;/P&gt;

&lt;P&gt;i tried this but not getting field output exp_day in output ... &lt;/P&gt;

&lt;P&gt;is this correct ...?&lt;/P&gt;

&lt;P&gt;Thank u &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:46:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143178#M185017</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143179#M185018</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;dur2sec()&lt;BR /&gt;
    Syntax: dur2sec(&lt;WC-FIELD&gt;) &lt;BR /&gt;
    Description: Convert a duration format "D+HH:MM:SS" to seconds. &lt;/WC-FIELD&gt;&lt;/P&gt;

&lt;P&gt;we have to convert this two fields in to seconds , that output have to apply the seconds value in  tostring command ....  , then we can get the output ...  ..... trying to get the output .... as of now i am not getting the results ...&lt;/P&gt;

&lt;P&gt;Thank u , &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 20:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143179#M185018</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-01T20:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143180#M185019</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/convert#Examples"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/convert#Examples&lt;/A&gt;  &lt;/P&gt;

&lt;P&gt;dur2sec()&lt;BR /&gt;
    Syntax: dur2sec(&lt;WC-FIELD&gt;) &lt;BR /&gt;
    Description: Convert a duration format "D+HH:MM:SS" to seconds.     ,&lt;/WC-FIELD&gt;&lt;/P&gt;

&lt;P&gt;but here ... we are able to see , it is converting the fields values in to seconds ...&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 20:33:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143180#M185019</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-01T20:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: i have one field like lastpasswordchangedate , by using this field i want to return value of  password expiry date .... 90days.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143181#M185020</link>
      <description>&lt;P&gt;Value "now()" is already in epoch so you don't need to convert it to epoch.  You can try following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval compare=strptime(exp_date,"%Y-%m-%d %H:%M:%S") | where compare&amp;gt;now()
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Oct 2014 22:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-have-one-field-like-lastpasswordchangedate-by-using-this-field/m-p/143181#M185020</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-10-01T22:43:32Z</dc:date>
    </item>
  </channel>
</rss>

