CALL FORMATDATETIME(CURRENT_TIMESTAMP(), 'MdyyyyHHmm', 'en', 'GMT')
Per:
http://www.h2database.com/html/functions.html?highlight=CURRENT_DATE&search=current_#formatdatetime
http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html
If you're keeping the files however, sometimes it's best to use yyyyMdHHmm
so they appear chronologically in directory/file listings etc...
On Friday, September 28, 2012 10:46:58 AM UTC-7, sc8132 wrote:
>
> Sorry, how do i format the date and time so its like this
>
> 092820121046
>
> to mmddyyyhhhh?
>
> On Friday, September 28, 2012 10:41:48 AM UTC-7, sc8132 wrote:
>>
>> you're awesome.. thank you!!!
>>
>>
>>
>> On Thursday, September 27, 2012 5:46:14 PM UTC-7, Brian wrote:
>>>
>>> call csvwrite('c:/temp/fileprefix-' || current_date(),'select * from
>>> data_push');
>>>
>>> On Thursday, September 27, 2012 6:30:03 AM UTC-7, sc8132 wrote:
>>>>
>>>> Hi,
>>>>
>>>> I have a call csvwrite script for my database. How can I include the
>>>> system date in the title of the csv file?
>>>>
>>>> Here is the current working script:
>>>> CALL CSVWRITE('C:\TEMP\exportdata.csv','SELECT "DATA_PUSH".*
>>>> FROM "PUBLIC"."DATA_PUSH"
>>>> "DATA_PUSH"','fieldDelimiter= writeColumnHeader=false');
>>>>
>>>> Thanks!
>>>> Sherry
>>>>
>>>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/h2-database/-/7zAzrs0oh1IJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.