(Attention: Green PHP newbie !)
I have an online inquiry form, delivering a date in the form yyyy/mm/dd to my feedback form. If the content passes several checks, the form sends an e-mail to me. All works fine. I just would like to receive the date in the form dd/mm/yyyy. I tried with some code, copied from a forum, but it resolves in a parse error. To make clear what I mean, I better insert the code, which is stripped down to 2 fields ('data_start' and 'data_end'). Can anyone please advise how to do and where to insert such a date conversion in this code below ?
Thanks a lot !
Here is the code: (my modification from line 39 to 47)
I want to change a date from format dd-mmm-yyyy to mm/dd/yyyy. Is there a way to do this with sed or do you have to write a case statement to convert JAN to 01? Thanks (9 Replies)
How to convert the date field from dd/mm/yyyy to yyyy/mm/dd in unix
my script will generate text file which have two fields
one is date and another is name of the server for example this is sample date which I have to sort based on older to newer date the problem is when I found out sort will... (4 Replies)
I have a file with some date columns in MM/DD/YYYY format:
SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|6/6/2007 |MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|11/6/2003|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458|
And I want to convert the date format to:
... (5 Replies)
Hello,
I am writing a script that parses different logs and produces one. In the source files, the date is in DD MM YYYY HH24:MI:SS format. In the output, it should be in DD MON YYY HH24:MI:SS (ie 25 Jan 2010 16:10:10)
To extract the dates, I am using shell substrings, i.e.:
read line
... (4 Replies)
could you please help be on the below code ..
Requirement is when i pass the parameter(for below 2) i should get current time -2 hours in the format :wall:..
cur_dt=`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID -P $PASSWD -h -C"select getdate()" | sed '2d'`
pr_dt="`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID... (2 Replies)
Hi,
I am having one log files. contains som data according to date. And it is going to append .Eg:abc.log contains below data
2011-10-19 abjhgj
2011-10-19 gjhgjgj
2011-10-20 hhhjh
2011-10-20 hhhhjj
2011-10-21 gg
.
.
.
2011-11-24 yyy
from log files i want catch only... (2 Replies)
I've seen a lot of posts on this and have tried the following:
echo 1257000000| perl -e '($d,$m,$y)=(localtime(time-86400));$m+=1;$y+=1900;printf "$y/$m/$d\n";'
But I am unable to convert a past Epoch date into a format such as YYYY/MM/DD or MM/DD/YYYY.
I am using bash and don't know... (4 Replies)
I am changing epoch times to dates. I was able to do the following:
echo "$varx" | gawk '{print strftime("%c", $0)}'
Mon Dec 31 16:26:40 2012
This changes the epoch date (which is what varx is) into localtime.
However, my problem is that I only want 12/31/2012 and not the Mon Dec 31... (2 Replies)
I am getting output of YYYY-MM-DD and want to change this to DD/MM/YYYY.
When am running the query in 'Todd' to_date(column_name,'DD/MM/YYYY') am getting the required o/p of DD/MM/YYYY, But when am executing the same query(Netezza) in linux server(bash) am getting the output of YYYY-MM-DD
file... (3 Replies)
Hi All,
I have line
,A,FDRM0002,12/21/2017,,0.961751583,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
it contains date in mm/dd/yyyy format i want to change this to yyyymmdd format using perl.
Use code tags, thanks. (8 Replies)
Discussion started by: vishal0746
8 Replies
LEARN ABOUT DEBIAN
ledgersmb::locale
LedgerSMB::Locale(3pm) User Contributed Perl Documentation LedgerSMB::Locale(3pm)NAME
LedgerSMB::Locale - Locale handling class for LedgerSMB
SYNOPSIS
Locale support module for LedgerSMB. Uses Locale::Maketext::Lexicon as a base.
METHODS
get_handle ($language_code)
Returns a locale handle for accessing the other methods. Inherited from Locale::Maketext.
text ($string, @params)
Returns the translation for the given string. This is a legacy wrapper that merely calls $self->maketext.
date ($myconfig, $date, $longformat)
Returns the given date after formatting it. $longformat is a ternary flag that determines how the date is formatted. If $longformat
is true, the date will be given in the form of "_('September') 23 2007". If $longformat is false but defined, the date will be in the
form of "_('Sep') 23 2007" unless the date is given in the form 'yyyy.mm.dd', in which case it is returned as-is. If $longformat is
not defined, the date will be output in the format specified by $myconfig->{dateformat}.
Copyright (C) 2006, The LedgerSMB core team.
#====================================================================
#
# Locale support module for LedgerSMB
# LedgerSMB::Locale
#
# LedgerSMB
# Small Medium Business Accounting software
# http://www.ledgersmb.org/
#
#
# Copyright (C) 2006
# This work contains copyrighted information from a number of sources
# all used with permission. It is released under the GNU General
# Public License Version 2 or, at your option, any later version.
# See COPYRIGHT file for details.
#
# This file contains source code included with or based on SQL-Ledger
# which is Copyright Dieter Simader and DWS Systems Inc. 2000-2005
# and licensed under the GNU General Public License version 2 or, at
# your option, any later version. For a full list including contact
# information of contributors, maintainers, and copyright holders,
# see the CONTRIBUTORS file.
#
# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (C) 2000
#
# Author: DWS Systems Inc.
# Web: http://www.sql-ledger.org
#
# Contributors: Thomas Bayen <bayen@gmx.de>
# Antti Kaihola <akaihola@siba.fi>
# Moritz Bunkus (tex)
# Jim Rawlings <jim@your-dba.com> (DB2)
#
#====================================================================
perl v5.14.2 2012-06-01 LedgerSMB::Locale(3pm)