Link to home
Start Free TrialLog in
Avatar of c00kie88
c00kie88Flag for Australia

asked on

Convert string to date

Hi all,

how do i convert user input (which i assume the example below is as string ) to unix date format?

echo "please enter date [dd/mm/yy]:
read answer

I can't use date -d option as my unix is sun solaris n does not support that.
It only supports

date [-u] mmddHHMM[[cc]yy][.SS]
 date [-u] [+format]
 date -a [-]sss[.fff]

any idea?



ASKER CERTIFIED SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why given grade B?
Avatar of Tintin
Tintin

Was your intention to reset the system date/time?  I got the impression you were simply trying to convert one date format to another.