Date time formatting issues!!!!

guys,
I am trying to format date and time in the same variable.
heres my code...
<cfset dtimes = LSDateFormat(now(),'YYYY-MM-DD
h:mm:ss')>
the problem is, that it gives me the year month and day
correctly.... the hour correctly, but where the minute is supposed
to go, it gives me the month again (which makes sense cuz obviously
its the same characters)... and then seconds are ok too. how do i
fix it so it gives me the correct minutes? Thanks in advance!!!!
JE

A limitation of CF functions there is not a single date &
time format
function you have to combine the two.
<cfset dtimes = LSDateFormat(now(),'YYYY-MM-DD') & ' '
LSTimeFormat(now(),'h:mm:ss')>
johnegbert wrote:
> guys,
> I am trying to format date and time in the same
variable. heres my code...
>
> <cfset dtimes = LSDateFormat(now(),'YYYY-MM-DD
h:mm:ss')>
>
> the problem is, that it gives me the year month and day
correctly.... the
> hour correctly, but where the minute is supposed to go,
it gives me the month
> again (which makes sense cuz obviously its the same
characters)... and then
> seconds are ok too. how do i fix it so it gives me the
correct minutes?
> Thanks in advance!!!!
> JE
>

Similar Messages

  • Batch file - how to Date & Time Format as January 6, 2014 - 8:54 PM Eastern

    Batch file - how to Date & Time Format as January 6, 2014 - 8:54 PM Eastern

    Hi Dhiravia,
    If you want to convert the month format, please refer to the batch script below:
    SET Month=%DATE:~4,2%
     if %Month%==01 set Month=JAN
     if %Month%==02 set Month=FEB
     if %Month%==03 set Month=MAR
     if %Month%==04 set Month=APR
     if %Month%==05 set Month=MAY
     if %Month%==06 set Month=JUN
     if %Month%==07 set Month=JUL
     if %Month%==08 set Month=AUG
     if %Month%==09 set Month=SEP
     if %Month%==10 set Month=OCT
     if %Month%==11 set Month=NOV
     if %Month%==12 set Month=DEC
     echo %Month%
    To convert the date format via cmd, please also check this article:
    http://myblog4fun.com/archive/2012/01/06/getting-the-current-date-and-time-from-bat-files.aspx
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Specifying date time format in Finder

    How can I specify the date-time format in Finder for the "date-modified" and "date-created" columns in list view?
    About three years ago, I got a command line instruction to set these formats and I kept it at mm/dd/yy
    Then a couple days ago, I changed the date format in iStat menus and the date-time formats started acting weird. I want the dates to be like "07/08/05" (mm/dd/yy) and then the formats started changing to "November 07, 2008" (month/dd/yyyy). This change seemed to take effect any time I open the view options for a folder. Now I discovered that the date format change depending on the column width according to the format specified in system preferences, international, formats.
    Narrow column, short date format; a little wider to long format, with ellipses if the column is not wide enough; then full format.
    Does anyone know the command line to set the format to keep it to the one I want?

    this doesn't seem to be it. however I now like the way Finder does display dates -- format gets more compact as the width of the column decreases; although there still is some excess space left on the left -- perhaps for AM & PM which I don't use; I use a 24 hour time format instead.
    Happy New Year

  • Convert Epoch Date Time to Date Time format

    I am trying to convert Epoch Date time in GMT to Human Readable Date time format in UTC. I used the one below but it returns just the date in GMT but how can get datetime in UTC ?
    select To_Char( To_Date( '01.01.1970 06:00:00','DD.MM.YYYY HH24:Mi:Ss') + STARTIME / 86400,'DD.MM.YYYY HH24:Mi:ss') FROM HQ_AVAIL_DATA_RLE;
    I refered a couple of forums and applied everything, but still I wouldn't get the timestamp.
    Please note that i'm looking for datetime stamp, not just the date.
    Thanks in advance!
    Edited by: 830754 on Jan 27, 2011 11:18 AM
    Edited by: 830754 on Jan 27, 2011 11:19 AM

    Works for me. I see date and time (submitted 1000 for STARTTIME):
    select To_Char( To_Date( '01.01.1970 06:00:00','DD.MM.YYYY HH24:Mi:Ss') + 1000 / 86400,'DD.MM.YYYY HH24:Mi:ss')
    from dual
    TO_CHAR(TO_DATE('01
    01.01.1970 06:16:40Or do you mean something else?

  • Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER

    Hi Experts,
    What is significance of Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER.
    Thanks,
    ABDUR

    I guess this would be applicable for the folowing formats - DATE, TIME, TIMESTAMP.
    This is the correct link
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Regards,
    Prateek

  • GregorianCalendar datetime format convert to  sql server date time format

    please help me
    my GregorianCalendar date time format is like this. *08/01/29 02:25:59* . I try to insert my database(sql server 2000 )
    data type is datetime ,in my database table display like this *2029-08-01 02:25:59.000* .can you help me to insert correct date in my database table like ( . *08/01/29 02:25:59*)

    use [PreparedStatement |http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html] and setTimestamp:
    [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html]

  • How to get the date time format in OCI

    How to get a date time format in OCI instead of only date

    You would have to use the OCIDateTime datatype for this. Refer to
    OCI documentation for more details.

  • Wrong DATE-TIME FORMAT among REPORTS NOTIFICATION EMAILs

    Dear all,
    I create a report request with url
    https://ocixxxx2.oci.xxcl.net/reports/rwservlet?>destype=printer&desformat=PDF&server=rep_xxxxx2_orahome&userid=ixxxxxx/xxxxxxx@saas&notifysuccess=IASL&notifyfailure=IASL&report=R1000R13.rdf&jobname=R1000R13&desname=HPLaserJet4150PCL6
    Email notification was generated with wrong date format .
    It's expected to be in UK English but it shows encoded text , may be random. I route it to another email servers such that find the date time is in chinese characters . That caused problem on original email server in which was not supported
    Could any expert please advice ?
    Warmly
    Edited by: MosielleKwan on 2010年2月26日 下午11:31

    It's indeed an expected behavior.
    When a Reports Server starts on a Windows machine, it likely detect the Windows Regional Settings in order to use it when needed later. This let the Reports Server communicate in the same format/way the Server machine uses. For example, if the System / Application Server administrator prefers to use the Windows (on which the Application Server is installed) with Chinese Regional Options, it is normal that the Reports Server send the Notification Email with a "Date/Time" Format matches the Windows.
    Thence, you like to get English/Western Date and Time format in the Reports Server Notification Email, it is required to change the Windows Regional Settings from Chinese to English and restart the Reports Server and restart the corresponding compoent. This will let the Reports Server detect the change and will send the Notification Email(s) then with English/Western Date and Time formats.
    If English/Western Date and Time format in the Reports Server Notification Email but still have the Windows Regional Settings set to Chinese, you can implement it
    that :-
    1. Change the Windows Regional Settings from Chinese to English.
    2. Restart the Reports Server and restart others.
    3. Change the Windows Regional Settings back from English to Chinese. .
    With these 3 steps, the Reports Server will keep sending the Notification Emails with English/Western Date and Time format, and maintain original settings.

  • Changing date/time format

    Hi there,
    I live in the United States but prefer my dates to be in the dd/mm/yy format as opposed to the US mm/dd/yy format. I also like 24-hour time rather than AM/PM. I System Preferences>Language & Text>Region, I found the tool to modify my preferred date/time formats. However, I notice that the format of the date in my menu bar does not change (it still reads Sep 25 when it should read 26 Sep). All other dates/times appear to function correctly. I briefly switched the Region of the computer to the United Kingdom but quickly switched it back because of how autocorrect handled words like "color."
    Ideas?

    That did the trick - sometimes the easiest thing to do is hard to see. Seems I have been working too long on a Windows machine (unfortunately, I have to do so at work)...
    Thanks for the quick help!

  • Sql ---sum of Date-time formate ......

    id time
    1 1.20
    2 2.30
    3 4.20
    4 5.30
    5 1.00
    result expected = 14:40 or (if AM/PM so result is ???)
    how can i calculate the sum of time ???
    please give me some fast tricks of handling date/time formate in oracle....

    942425 wrote:
    id time
    1 1.20
    2 2.30
    3 4.20
    4 5.30
    5 1.00
    result expected = 14:40 or (if AM/PM so result is ???)
    how can i calculate the sum of time ???
    please give me some fast tricks of handling date/time formate in oracle....Hi,
    First you post in wrong forum. Please post at PL/SQL
    Before posting there close it and mark as answered.
    if your time is number data type then you can try this
    SELECT SUM(NVL(ROUND(TRUNC(DAC_OT_HOUR)+((TO_NUMBER (SUBSTR (DAC_OT_HOUR, INSTR (DAC_OT_HOUR,'.',1,1)+1)))/60)),0))
    FROM DA_CHECKHope this helps
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • Importing ansi date time format into diadem

    Hi,
    I have an ANSI data log txt file with the time channel format  30/03/2006 15:51:08.846 and i am trying import into DIADEM  using the date/time format dd/mm/yyyy hh:nn:ss.fff , but when the file is imported, the time channel cells appear as NO VALUE. Can anybody help please ?
    AdeK

    Hi Adek,
    Here is a DataPlugin which loads your data file into DIAdem 10.2.  There are a number of advantages to using a DataPlugin over the ASCII Import Wizard, so long as your data files follow a similar data file structure.  To register the DataPlugin, just detach the ZIP file, unzip the URI file within, then double-click on the URI file in Windows Explorer.  After that, you will be able to load your TXT data files by dragging&dropping them directly from the NAVIGATOR tree view or Search Results into the Data Portal on the right hand side of DIAdem.  DataPlugins also support selective loading, register loading, reduced loading, and DataFinder indexing, so all of these immediately become available to you with your TXT files.  Note also that header lines 2-4 are now declared as both File and Group properties.
    Ask if you have questions using the DataPlugin,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Adek_TXT.zip ‏2 KB

  • ConsoleOne lacking Date/Time-Format-Tab for Client-Setting

    I remember from GW6 the Client-Setting-Tab in ConsoleOne for Date-/Time-Format (for local german format)
    There is a tab with these settings in the GW8-Client, but I cannot find this specific setting in ConsoleOne.
    Any ideas?
    Sincerely
    Karl

    The availability in ConsoleOne with GW6.0 is confirmed. Now, since it seems to be gone with GW8.0, how would someone deal with the need of a central adjustment of this setting? At time I am running through the firm with setting this at the users workplace in the GW8.0-Client under Tools/Options/Calendar/Date-Time with hitting the button "Set to System" (or something like that - I have it in German).
    Sincerely
    Karl
    Originally Posted by laurabuckley
    Hi Karl,
    Personally, I don't recall such a setting in ConsoleOne.
    Sorry, not much use, just confirmation that you are not doing something wrong!
    Cheers,

  • Difference between LV 6.1 and LV 7.0 - Date\Time Format

    I found different behviour of numeric controls in Date/Time format, or
    in "Seconds to Date\Time String" function in LV6.1 and LV7.0
    In LV 6.1:
    Absolute time in seconds is formated in control with date/time format,
    output depends on local time format on computer, where this VI runs.
    So if I start LabView on machine with specific time zone, and for
    example DST on, the output was changed by these settings. ANY number
    of second is handled by this settings.
    In LV 7.0:
    Output still depends on specific time zone, but the use of the DST
    on/off depends on absolute time value. So if the number represents
    absolute time which fits period when DST was off, the output is
    wihtout DST, even if the DST is on when this vi runs.
    The solution in LV 7.0 is much more better than in LV 6.1, but ...
    If data are measured and stored (store of absoulte time DBL) in one
    time zone, and if they are processed in different time zone (for
    exapmle where DST change is in different time), the data
    representation is wrong.
    In LV 6.1 it was not correct too, but anyway there was a way how to
    solve this problem:
    I stored absolute time DBL and GMT delta for every time stamp. When I
    process this stored data on different computer with different time
    zone, I recalculate time stamps in this way:
    absolute time + stored GMT delta - GMT delta of computer where data
    are presented.
    So in final I have correct time does not matter on time zone or any
    other settings which are on computer where are data presented.
    But on LV 7.0, the GMT delta is not constant for every data and this
    algorithm is useless. I can simply show correct time when data are
    from same time zone without any calculation, but it is almost
    imposible to correct show data
    from different time zone.
    My question is:
    Is there any "ini file item", which can tell LabView 7.0 to use time
    representation style as in LV 6.1 ?
    Thank you and best regards
    Jiri Hula

    Thanks for the well written question.
    Unfortunately, there is no ini token or any way of specifying LabVIEW use the LV 6.1 style.
    I am attaching a LabVIEW 7.0 VI that calculates the UTC Offset for a given time value (I don't think the same code would work correctly in LabVIEW 6.1). The VI comments are:
    The attached VI will take Daylight Saving and Time zone into account to compute the offset in seconds from UTC Time to the Local time (as specified by the computer). Note: This VI can aid in converting from Local Time to UTC time, but not in converting from one Timezone to another.
    I hope it helps. Basically, your data is in UTC (absolute time) as it has always been, but LabVIEW 7.0 changed the way it displays the UTC data (trying to be more correct). If you wish to display it the way it was in LabVIEW 6.1, things are going to get a little tricky. LabVIEW 6.1 displayed the same DBL absolute time differently depending on if the current computer time was in DST or not. To get this behavior in LabVIEW 7.0, the equation:
    absolute time + stored GMT delta - GMT delta of computer where data are presented
    is still correct, but for LabVIEW 7.0 the GMT deltas now vary depending on whether the absolute time is in DST or not. It may be possible to convert the GMT offset you have saved from LabVIEW 6.1 into a set or pair of UTC Offsets. This would require a knowledge of what the DST state was for each of the data points in question.
    The DST state or GMT/UTC offset that the computer currently is using may be obtained from the attached VI.
    The absolute time is stored in GMT/UTC so that in different time zones it will still equate to the same time, even though it will be displayed differently. Another data format (such as storing the Hour, Minute, Second, Day, Month, Year; or storing the date as a string) might be more appropriate if the time should be displayed as the same local time regardless of the time zone.
    I hope this helps. Please respond if you have any comments or questions.
    Shawn Walpole
    Attachments:
    GetUTCOffset.vi ‏52 KB

  • CRS 2008 Web Services: Date parameter format issue

    Hi All,
    I have CRS 2008 installations (Dev environment and TEST environment) on two machine (both are on the build 12.1.0.882). I have a web application that runs crystal reports deployed to these servers using web services. On the DEV Server , the report works fine when the reports input parameters are formatted to mm/dd/yyyy format.  But TEST server (which is a new installation) does not accept a date parameter value for this report in this format and returns a "could not set date parameter" error.  The report runs fine if I pass the parameter in yyyy/dd/dd format from the web-application.
    I compared the regional language settings and Business Objects registry entries on both these machines, CMC settings, and they all seem to match. Am I missing something in the configuration or environment setup that is causing this issue? Appreciate any hints on solving this issue. Thanks so much.
    Regards
    Ajith

    Hi Siva,
    may i know how to do it?
    as i did try to code in the begining by using String for my startDate and endDate. and it is able to consume, but currently if i change the startDate and endDate to Date. it is still able to consume when i change the date from "2008-01-30T10:00:50.342Z" to just "2008-01-30". but when i try to use adobe interactive form. the startDate and endDate i am using the Date/Time Field Type. and the Data Format is as Date. so it will just return "2008-01-30" only.
    the part where i have error is when i try to do a parameter mapping from the interactive form to the web service. it is unable to map as they keep prompting that cannot map a Date to a Time Stamp.
    that is why i stuck at this part.. so i try to find out how to overcome this errors now..
    Regards
    Jia Jun

  • HCM Process & Forms: Date & Time Stamp issue in Prev Comments Box

    Hi
    We implemented HCM Process and Forms and we are in EHP4.  We need user name, date and time stamp in each step for audit purpose.
    Form Process Example:
    Step1: Manager -> Initiates a Form for employee pay/position changes  (REQUEST)
    Step2: 1-Up Manager -> Approves a Form for employee pay/position changes (APPROVE)
    Step3: HR Admin -> Process a Form for employee pay/position changes (PROCESS)
    Process Overview: HR Admin can open a form once all steps are completed and they want to see all 3 steps date & stamp here.
    New Comments -> To enter user comments in each step. Used data type HRASR_CURRENT_NOTE
    Previous Comments-> To display prev. step / user's comments including user name, date & time. Used data type HRASR_PREVIOUS_NOTES.
    I tried all different property settings in the form. May be I am still missing some property settings here.
    Issue:  If user enters any comments in "New Comments" box then only date & time stamp is coming along with their comments in "Previous Comments" otherwise not showing anything, just blank in the Prev. Comments.  I added some code in form script in case no data in "New Comments" then default a value ":" . It is working fine for first step but not working the same for other 2 steps.
    Trying in different way:
    Creating 3 text fields in a form just for display purpose and modifying each field (data set) with some text (combination of user name, system date and time) at each stage/step in a BADI.
    Method: IF_HRASR00GEN_SERVICE~DO_OPERATIONS
    Here it is updating correctly for first step/stage (REQUEST) and other 2 fields are not updating accordingly. I did debug for each step and updating the data set correctly but finally not dispalying the valuse in a form except first field.
    Can someone please share your ideas or inputs.
    Appreciate your time & help!
    Thanks
    Hari

    Hi Sahir
    Thank you for your reply.
    As I explained in my post, user details with date & stamp are coming when user enters some comments otherwise it is blank., All users may not enter comments because it is not a "required".
    HR is needed this for audit purpose, just at end of the process they need to see all user names, date & stamp in the form. Forget about comment boxes, Can't we make just simple text fields with user details for each step (all 3 stages)?
    FYI:
    Issue:  If user enters any comments in "New Comments" box then only date & time stamp is coming along with their comments in "Previous Comments" otherwise not showing anything, just blank in the Prev. Comments.  I added some code in form script in case no data in "New Comments" then default a value ":" . It is working fine for first step but not working the same for other 2 steps.
    Appreciate your inputs !
    Thanks
    Hari

Maybe you are looking for