07-29-2010
Convert date
If I pass the value in the form YYYY/MM/DD(20100719) how to convert in the form 19\/Jul\/2010
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I need to convert a char date to the datetime format for a table in sybase. I don't know how to do it, can anyone help me on this ?
Thanks a lot !!!!
:) (2 Replies)
Discussion started by: nzq71k
2 Replies
2. Shell Programming and Scripting
Hi,
I have script in unix which creates a julian date like 126 or 127
I want convert this julian date into calender date
ex : input 127
output 07/may/2007 or 07/05/2007 or 07/05/07
rgds
srikanth (6 Replies)
Discussion started by: srikanthus2002
6 Replies
3. Shell Programming and Scripting
Hi,
I have a file where each record has a date field in yymmdd format. How can I convert it to a new file with the date changed to mm/dd/yy and a space before and after?
Input file:
9S14BT080407000000
6S14YS080402000000
6S14CK080402000000
Output needed:
9S14BT 04/07/08 000000
6S14YS... (5 Replies)
Discussion started by: zmaster18
5 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
Need your help in converting a date format in ksh.
I'm currently working on SUN os where my script is getting a date from a table.
The result returns to ksh in this format: 17-JUL-08
How do i convert this string to a date format like yyyymmdd?
I tried #!/bin/ksh
d="17-JUL-08"... (5 Replies)
Discussion started by: agathaeleanor
5 Replies
5. Shell Programming and Scripting
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies
6. UNIX for Dummies Questions & Answers
hi friends,
I m trying to write a script which compares to dates.
for this i am converting dates into no using synatx
as below
v2=`date | awk '{print $2,$3,$4}'`
v3=`date +%s -d "$v2"`
this syntax is working in bash shell ,but fails in ksh shell.
please suggest on this. (12 Replies)
Discussion started by: Jcpratap
12 Replies
7. Shell Programming and Scripting
Doing a bcp load to sybase and need to convert datearg which comes in as 20130501 to 2013-05-01 which is the best way to do this (4 Replies)
Discussion started by: tasmac
4 Replies
8. Shell Programming and Scripting
I am not able to pass date stored in a variable as an argument to date command. I get current date value for from_date and to_date
#!/usr/bin/ksh
set -x
for s in server ; do
ssh -T $s <<-EOF
from_date="12-Jan-2015 12:02:09"
to_date="24-Jan-2015 13:02:09"
echo \$from_date
echo... (7 Replies)
Discussion started by: raj48
7 Replies
9. Shell Programming and Scripting
Hi guys
I am looking to convert this kind of entry in a txt file
26/04/2008
to
April 2008
Note : this is not using the date command , these are date entries in a file
can i do this with sed ?
Use code tags, thanks. (5 Replies)
Discussion started by: johnnybananas
5 Replies
LEARN ABOUT OPENSOLARIS
bsltoh_r
btohex(3TSOL) Trusted Extensions Library Functions btohex(3TSOL)
NAME
btohex, bsltoh, bcleartoh, bsltoh_r, bcleartoh_r, h_alloc, h_free - convert binary label to hexadecimal
SYNOPSIS
cc [flag...] file... -ltsol [library...]
#include <tsol/label.h>
char *bsltoh(const m_label_t *label);
char *bcleartoh(const m_label_t *clearance);
char *bsltoh_r(const m_label_t *label, char *hex);
char *bcleartoh_r(const m_label_t *clearance, char *hex);
char *h_alloc(const unsigned char type);
void h_free(char *hex);
DESCRIPTION
These functions convert binary labels into hexadecimal strings that represent the internal value.
The bsltoh() and bsltoh_r() functions convert a binary sensitivity label into a string of the form:
[0xsensitivity_label_hexadecimal_value]
The bcleartoh() and bcleartoh_r() functions convert a binary clearance into a string of the form:
0xclearance_hexadecimal_value
The h_alloc() function allocates memory for the hexadecimal value type for use by bsltoh_r() and bcleartoh_r().
Valid values for type are:
SUN_SL_ID label is a binary sensitivity label.
SUN_CLR_ID label is a binary clearance.
The h_free() function frees memory allocated by h_alloc().
RETURN VALUES
These functions return a pointer to a string that contains the result of the translation, or (char *)0 if the parameter is not of the
required type.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe with exceptions |
+-----------------------------+-----------------------------+
The bsltoh(), bcleartoh(), bsltoh_r(), bcleartoh_r(), h_alloc(), and h_free() functions are Obsolete. Use the label_to_str(3TSOL) function
instead.
The bsltoh() and bcleartoh() functions share the same statically allocated string storage. They are not MT-Safe. Subsequent calls to any of
these functions will overwrite that string with the newly translated string. The bsltoh_r() and bcleartoh_r() functions should be used in
multithreaded applications.
SEE ALSO
atohexlabel(1M), hextoalabel(1M),label_to_str(3TSOL), libtsol(3LIB), attributes(5), labels(5)
NOTES
The functionality described on this manual page is available only if the system is configured with Trusted Extensions.
SunOS 5.11 20 Jul 2007 btohex(3TSOL)