Sponsored Content
Top Forums Shell Programming and Scripting AIX : Need to convert UNIX Timestamp to normal timestamp Post 302959147 by rahul2662 on Thursday 29th of October 2015 10:18:04 AM
Old 10-29-2015
Hello Ravinder,

The strftime function doesnt works in AIX Server. I got the following error :

awk: 0602-553 Function strftime is not defined.

Thanks
Rahul
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

AIX/awk date to unix timestamp

Hello, I am inside a awk script on AIX, I am feeding to awk ls -luNR i need to convert ls -u time format "month day h:m/yr" to Unix epoch time, POSIX time, or aka unix timestamp I do not have strftime funk in my awk, and i have to do this fast meaning that I cannot do a system call in the... (1 Reply)
Discussion started by: nullwhat
1 Replies

2. Shell Programming and Scripting

Convert Unix Timestame to real timestamp

Hello, Did anyone know how to use script (e.g. perl) to conver Unix Timestame to real timestame in GMT+8 ? 1245900787 file:/tmp/a/Test/.txt.swp has created 1245900988 file:/tmp/a/Test/.txt.swp has changed Thu, 25 Jun 2009 11:33:07 GMT+8 file:/tmp/a/Test/.txt.swp has created Thu, 25 Jun... (4 Replies)
Discussion started by: happyday
4 Replies

3. Shell Programming and Scripting

To convert a date(in string format) to unix timestamp

Hi All, I have a string like below. "Mar 31 2009" . I want to convert this to unix time . Also please let me know how to find the unix time for the above string minus one day. For Eg. if i have string "Mar 31 2009" i want to find the unix time stamp of "Mar 30 2009". Thanks in advance,... (11 Replies)
Discussion started by: girish.raos
11 Replies

4. AIX

Convert unix timestamp to year month day format ?

Hello, How do I convert unix timestamp value to 'normal' date format - to get year month and day values ? Looks like it's easy to do using GNU date (linux systems). But how do I do tthis on AIX ? I don't want to write C program, any ways to do that using unix shells ? thanks (1 Reply)
Discussion started by: vilius
1 Replies

5. AIX

convert a specific date to a unix timestamp

hello, i have an AIX5.3 machine and i am writing a script to display some processes. inside the script i want to get the time that the process starts and convert it to a unix timestamp. is there a command that i can use to do that? i search the web but all i found is long scripts and it does... (4 Replies)
Discussion started by: omonoiatis9
4 Replies

6. UNIX for Dummies Questions & Answers

How to convert R$Timestamp in Sql*Plus within a UNIX Shell Script?

I need to compare a R$Timestamp field sql within a Unix Shell Script. In straight SQL the following code works fine: Table Name: LL_UNIT_TRANSACTION UT Field: R$Timestamp Where TRUNC(UT.R$Timestamp) >= TRUNC(SYSDATE -7) the following returns no data within the Unix Shell Script... (2 Replies)
Discussion started by: Dapconsult
2 Replies

7. Shell Programming and Scripting

To check timestamp in logfile and display lines upto 3 hours before current timestamp

Hi Friends, I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies

8. Shell Programming and Scripting

Convert UNIX timestamp to readable format in the file

Hello I have a file : file1.txt with the below contents : 237176 test1 test2 1442149024 237138 test3 test4 1442121300 237171 test5 test7 1442112823 237145 test9 test10 1442109600 In the above file fourth field represents the timestamp in Unix format. I found a command which converts... (6 Replies)
Discussion started by: rahul2662
6 Replies

9. Shell Programming and Scripting

Convert date in dd mm yyyy format to UNIX timestamp

Hello All, I have a date in DD/MM/YYYY format. I am trying to convert this into unix timestamp. I have tried following: date -d $mydate +%s where mydate = 23/12/2016 00:00:00 I am getting following error: date: extra operand `+%s' Try `date --help' for more information. ... (1 Reply)
Discussion started by: angshuman
1 Replies

10. Shell Programming and Scripting

Grep lines between last hour timestamp and current timestamp

So basically I have a log file and each line in this log file starts with a timestamp: MON DD HH:MM:SS SEP 15 07:30:01 I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
NL_LANGINFO(3)								 1							    NL_LANGINFO(3)

nl_langinfo - Query language and locale information

SYNOPSIS
string nl_langinfo (int $item) DESCRIPTION
nl_langinfo(3) is used to access individual elements of the locale categories. Unlike localeconv(3), which returns all of the elements, nl_langinfo(3) allows you to select any specific element. PARAMETERS
o $item -$item may be an integer value of the element or the constant name of the element. The following is a list of constant names for $item that may be used and their description. Some of these constants may not be defined or hold no value for certain locales. nl_langinfo Constants +-------------------------------+---------------------------------------------------+ | Constant | | | | | | | Description | | | | +-------------------------------+---------------------------------------------------+ | | | | LC_TIME Category Constants | | | | | | | | | ABDAY_(1-7) | | | | | | | Abbreviated name of n-th day of the week. | | | | | | | | DAY_(1-7) | | | | | | | Name of the n-th day of the week (DAY_1 = Sun- | | | day). | | | | | | | | ABMON_(1-12) | | | | | | | Abbreviated name of the n-th month of the year. | | | | | | | | MON_(1-12) | | | | | | | Name of the n-th month of the year. | | | | | | | | AM_STR | | | | | | | String for Ante meridian. | | | | | | | | PM_STR | | | | | | | String for Post meridian. | | | | | | | | D_T_FMT | | | | | | | String that can be used as the format string for | | | strftime(3) to represent time and date. | | | | | | | | D_FMT | | | | | | | String that can be used as the format string for | | | strftime(3) to represent date. | | | | | | | | T_FMT | | | | | | | String that can be used as the format string for | | | strftime(3) to represent time. | | | | | | | | T_FMT_AMPM | | | | | | | String that can be used as the format string for | | | strftime(3) to represent time in 12-hour format | | | with ante/post meridian. | | | | | | | | ERA | | | | | | | Alternate era. | | | | | | | | ERA_YEAR | | | | | | | Year in alternate era format. | | | | | | | | ERA_D_T_FMT | | | | | | | Date and time in alternate era format (string can | | | be used in strftime(3)). | | | | | | | | ERA_D_FMT | | | | | | | Date in alternate era format (string can be used | | | in strftime(3)). | | | | | | | | ERA_T_FMT | | | | | | | Time in alternate era format (string can be used | | | in strftime(3)). | | | | | | | |LC_MONETARY Category Constants | | | | | | | | | INT_CURR_SYMBOL | | | | | | | International currency symbol. | | | | | | | | CURRENCY_SYMBOL | | | | | | | Local currency symbol. | | | | | | | | CRNCYSTR | | | | | | | Same value as CURRENCY_SYMBOL. | | | | | | | | MON_DECIMAL_POINT | | | | | | | Decimal point character. | | | | | | | | MON_THOUSANDS_SEP | | | | | | | Thousands separator (groups of three digits). | | | | | | | | MON_GROUPING | | | | | | | Like "grouping" element. | | | | | | | | POSITIVE_SIGN | | | | | | | Sign for positive values. | | | | | | | | NEGATIVE_SIGN | | | | | | | Sign for negative values. | | | | | | | | INT_FRAC_DIGITS | | | | | | | International fractional digits. | | | | | | | | FRAC_DIGITS | | | | | | | Local fractional digits. | | | | | | | | P_CS_PRECEDES | | | | | | | Returns 1 if CURRENCY_SYMBOL precedes a positive | | | value. | | | | | | | | P_SEP_BY_SPACE | | | | | | | Returns 1 if a space separates CURRENCY_SYMBOL | | | from a positive value. | | | | | | | | N_CS_PRECEDES | | | | | | | Returns 1 if CURRENCY_SYMBOL precedes a negative | | | value. | | | | | | | | N_SEP_BY_SPACE | | | | | | | Returns 1 if a space separates CURRENCY_SYMBOL | | | from a negative value. | | | | | | | | P_SIGN_POSN | | | | | | | | | | | | | o Returns 0 if parentheses | | | surround the quantity and | | | CURRENCY_SYMBOL. | | | | | | o Returns 1 if the sign | | | string precedes the quantity | | | and | | | CURRENCY_SYMBOL. | | | | | | o Returns 2 if the sign | | | string follows the quantity | | | and | | | CURRENCY_SYMBOL. | | | | | | o Returns 3 if the sign | | | string immediately precedes | | | the | | | CURRENCY_SYMBOL. | | | | | | o Returns 4 if the sign | | | string immediately follows | | | the | | | CURRENCY_SYMBOL. | | | | | | | | N_SIGN_POSN | | | | | | | | |LC_NUMERIC Category Constants | | | | | | | | | DECIMAL_POINT | | | | | | | Decimal point character. | | | | | | | | RADIXCHAR | | | | | | | Same value as DECIMAL_POINT. | | | | | | | | THOUSANDS_SEP | | | | | | | Separator character for thousands (groups of | | | three digits). | | | | | | | | THOUSEP | | | | | | | Same value as THOUSANDS_SEP. | | | | | | | | GROUPING | | | | | | | | | | T{ | | | | | | LC_MESSAGES Category Constants | | | | | | | | YESEXPR | | | | | | | Regex string for matching "yes" input. | | | | | | | | NOEXPR | | | | | | | Regex string for matching "no" input. | | | | | | | | YESSTR | | | | | | | Output string for "yes". | | | | | | | | NOSTR | | | | | | | Output string for "no". | | | | | | | | LC_CTYPE Category Constants | | | | | | | | | CODESET | | | | | | | Return a string with the name of the character | | | encoding. | | | | +-------------------------------+---------------------------------------------------+ RETURN VALUES
Returns the element as a string, or FALSE if $item is not valid. NOTES
Note This function is not implemented on Windows platforms. SEE ALSO
setlocale(3), localeconv(3). PHP Documentation Group NL_LANGINFO(3)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy