web
オフライン状態です。これはページの読み取り専用バージョンです。
close


投稿済み Tue, 15 Jun 2021 08:46:56 GMT 、投稿者 Gilles TATON

Hi there,

I would like to format my date to input it in file name.

I try that : 

Put my date in Global Text Variable : GV__DATE
and then try to format it like that, in another indexes that give my filename : GV_CDPF + "_" + GV_NATURE__DOC +  "_" + Format(GV_DATE__DOC,"dd/MM/yyyy")

The result : 12345_Invoice_dd/mm/yyy

I don't know where i'am wrong..

Thanks !!

投稿済み Thu, 17 Jun 2021 15:22:39 GMT 、投稿者 Gilles TATON
Hello all,

So, for the moment i have split my actual index into 3 text variable like that :

Put the date indexe in text variable, and then split it like that :

Year variable : Split(GV_DATE__DOC, "/")(2)
Month variable : Split(GV_DATE__DOC, "/")(0)
Day variable : Split(GV_DATE__DOC, "/")(1)

Then compose your date like you want :

GV_Day__Txt+"/"+GV_Month__Txt+"/"+GV_Year__Txt

Thanks.

 
投稿済み Tue, 29 Jul 2025 07:22:38 GMT 、投稿者 Support Docuworx
a
投稿済み Mon, 04 Aug 2025 22:35:59 GMT 、投稿者 Jacob Eaton Software Integration Specialist
Hey,

I see you have a solution for this, but I wanted to let you know that you can get the result you want without having to split.

All you need to do is use the Format(DW_DOCUMENT_DATE, "dd/MM/yyyy") or DW_DOCUMENT_DATE.ToString("dd/MM/yyyy") when you assign to the GV_DOC__DATE global variable. Also, this is assuming that you have an index field that is a Date or DateTime type.

The issue is that the format function is different for a Text variable than it is for a Date or DateTime variable.

Regards,
Jacob Eaton
 

フォーラムに投稿するためにはログインが必要です。